Created
May 17, 2021 21:14
-
-
Save sowderca/81f68c4f29a1209e33c8694bfbc2586a to your computer and use it in GitHub Desktop.
local admins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-CimInstance -ComputerName $ComputerName -Namespace 'root/cimv2' -QueryDialect 'WQL' -Query "associators of {Win32_Group.Domain='$($ComputerName)',Name='Administrators'} where Role=GroupComponent"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment