-
Notifications
You must be signed in to change notification settings - Fork 0
Get MyGroupMembership
Mike Garvey edited this page Jul 23, 2020
·
1 revision
Gets a list of the currently logged-in user's local and domain group membership.
Get-MyGroupMembership [[-Type] <GroupType[]>] [<CommonParameters>]
Parses the output from 'whoami.exe' to retrieve a PowerShell object list of groups that the currently logged-in user in a member of.
Retrieve only groups of the 'WellKnown' type.
C:\PS> Get-MyGroupMembership -Type WellKnownGroup
Indicates to only return the specified type(s) of 'groups' from whoami.exe.
Type: GroupType[]
Parameter Sets: Set 1
Aliases: t
Required: false
Position: 0
Default Value:
Accepted Values: Alias
Group
Label
WellKnownGroup
Pipeline Input: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
An object with "GroupName", "Type", "SID", and "Attributes".