Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Remove-EntraGroupMember

Removes a member from a group.

Syntax

Default (Default)

Remove-EntraGroupMember

 -GroupId <String>
 -MemberId <String>
 [<CommonParameters>]

Description

The Remove-EntraGroupMember cmdlet removes a member from a group in Microsoft Entra ID. Specify the ObjectId and MemberId parameters to remove a member from a group.

Examples

Example 1: Remove a member

Connect-Entra -Scopes 'GroupMember.ReadWrite.All'
$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'"
$groupMember = Get-EntraGroup -GroupId $group.Id | Get-EntraGroupMember | Where-Object {$_.displayName -eq 'Adele Vance'}
Remove-EntraGroupMember -GroupId $group.Id -MemberId $groupMember.Id

This command removes the specified member from the specified group.

  • GroupId - Specifies the object ID of a group in Microsoft Entra ID.

  • MemberId - Specifies the ID of the member to remove.

Parameters

-GroupId

Specifies the object ID of a group in Microsoft Entra ID.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ObjectId

Parameter sets

-MemberId

Specifies the ID of the member to remove.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Related Links


Feedback

Was this page helpful?