This file contains hidden or 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 |
Where:
timus - is the user you want to get membership of
mydomain - domain name or PC name if workgroup
No comments:
Post a Comment