< Back

Test-ActiveDirectoryGroupMembership

Mon Jan 13, 2020 6:01 am

NAME Test-ActiveDirectoryGroupMembership



SYNOPSIS

Test if a user is a member of a group.





SYNTAX

Test-ActiveDirectoryGroupMembership [-User] <String[]> [-Group] <String> [-Recurse] [<CommonParameters>]





DESCRIPTION

Test if a user is member of a security group.





PARAMETERS

-User <String[]>

The username of the user.



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Group <String>

The name of the group.



Required? true

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Recurse [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Test-ADNestedGroupMembership myuser mygroup















RELATED LINKS