Clear-PnPAzureADGroupMember
SYNOPSIS
Required Permissions
- Microsoft Graph API : One of Directory.ReadWrite.All, Group.ReadWrite.All, GroupMember.ReadWrite.All
Removes all current members from a particular Azure Active Directory group. This can be a security, distribution or Microsoft 365 group.
SYNTAX
Clear-PnPAzureADGroupMember -Identity <AzureADGroupPipeBind> [-Connection <PnPConnection>]
DESCRIPTION
Allows to remove all current members from specified Azure Active Directory group. This can be a security, distribution or Microsoft 365 group.
EXAMPLES
EXAMPLE 1
Clear-PnPAzureADGroupMember -Identity "Project Team"
Removes all the current members from the Azure Active Directory group named "Project Team".
PARAMETERS
-Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Identity
The Identity of the Azure Active Directory group to remove all members from.
Type: AzureADGroupPipeBind
Parameter Sets: (All)
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
RELATED LINKS
Microsoft 365 Patterns and Practices Microsoft Graph documentation