Jun
28
28
Get local admin and guestaccounts using powershell
Posted by jbjorkman on June 28, 2009 underDeprecated: preg_replace() [function.preg-replace]: The /e modifier is deprecated, use preg_replace_callback instead in /var/www/myfoto.se/jbits.se/blog/wp-includes/formatting.php on line 82
Powershell
#Get Local Adminaccount
get-wmiobject -query "Select * from Win32_Account where LocalAccount=True and SID like 'S-1-5-21-%-500'"
#Get Local Guestaccount
get-wmiobject -query "Select * from Win32_Account where LocalAccount=True and SID like 'S-1-5-21-%-501'"