3 ms·
Hmmmm, That will just return the name of the built-in Administrators account. If you wanted to find all user accounts in the administrators group you could do:
by Randor 7y ago
Hmmmm,
That will just return the name of the built-in Administrators account. If you wanted to find all user accounts in the administrators group you could do:
powershell -c "$([ADSI]'WinNT://YOUR_MACHINE_NAME/Administrators,group').psbase.Invoke('Members') | foreach { $_.GetType().InvokeMember('ADspath', 'GetProperty', $null, $_, $null)}"