Created
December 4, 2019 01:39
-
-
Save technoscavenger/0184746386b79b8ef825ae5ee6760082 to your computer and use it in GitHub Desktop.
Get membership of a given Windows user
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
$query = "ASSOCIATORS OF {Win32_Account.Name='timus',Domain='mydomain'} WHERE ResultRole=GroupComponent ResultClass=Win32_Account" | |
Get-WMIObject -Query $query | Select Name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment