I want to register the date and time of each time switch user is invoked in a machine. How can I do that? Something similar to this but for the "switch user" event: detect log off and on with powershell
Thank you in advance
I want to register the date and time of each time switch user is invoked in a machine. How can I do that? Something similar to this but for the "switch user" event: detect log off and on with powershell
Thank you in advance
I think that what you are looking for this :
But these events appears in "Security" event log only when you configure "Audit conexion events" in the auditing stratégie.
Sorry for the french screen, but I think that's better than nothing.
After that when using "Fast User Switching", if you filter events IDs 4778 and 4779, you can see something like :
So the powerShell adaption of the code you point in your question is something like :
I hope this helps.
JP
PS : you can find other informations about "Fast user switching" in french there.