Module Name | schema | applicable | online version | external help file | title |
---|---|---|---|---|---|
PnP.PowerShell |
2.0.0 |
SharePoint Online |
PnP.PowerShell.dll-Help.xml |
Clear-PnPAzureADGroupMember |
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.
Clear-PnPAzureADGroupMember -Identity <AzureADGroupPipeBind> [-Connection <PnPConnection>]
Allows to remove all current members from specified Azure Active Directory group. This can be a security, distribution or Microsoft 365 group.
Clear-PnPAzureADGroupMember -Identity "Project Team"
Removes all the current members from the Azure Active Directory group named "Project Team".
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
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
Microsoft 365 Patterns and Practices Microsoft Graph documentation