Jan 20 2020 06:35 AM - edited Jan 20 2020 06:36 AM
Hello fellow humans,
I'm finding how to get logon user name using 'SYSTEM Privilege' (NT AUTHORITY\SYSTEM)
$currentuser = $env:username
$currentuser
Codes show 'SYSTEM' value.
How can i get logon user using system privilege?
Kind Regards
Jan 20 2020 09:23 AM
Why would you expect to see a different value when you are running in the context of the system user? If you simply want to list all users currently logged on the machine, use one of the methods here: https://stackoverflow.com/questions/23219718/powershell-script-to-see-currently-logged-in-users-doma...
Jan 20 2020 04:06 PM
Jan 23 2020 06:28 AM
This would be easier to understand if you could share more detail about what you're troubleshooting.
Are you having issues with a client applying GPO?
Are you trying to enumerate who is logged on and the amount of priv access they have?