Remove-EntraGroupOwner
Removes an owner from a group.
Syntax
Remove-EntraGroupOwner
-OwnerId <String>
-GroupId <String>
[<CommonParameters>]
Description
The Remove-EntraGroupOwner
cmdlet removes an owner from a group in Microsoft Entra ID. Specify the GroupId
and OwnerId
parameters to remove an owner from a group.
Examples
Example 1: Remove an owner
Connect-Entra -Scopes 'Group.ReadWrite.All'
$group = Get-EntraGroup -Filter "DisplayName eq 'HelpDesk Team Leaders'"
$groupOwner = Get-EntraGroup -GroupId $group.Id | Get-EntraGroupOwner | Where-Object {$_.displayName -eq 'Adele Vance'}
Remove-EntraGroupOwner -GroupId $group.Id -OwnerId $groupOwner.Id
This example demonstrates how to remove an owner from a group in Microsoft Entra ID.
GroupId
- Specifies the ID of a group in Microsoft Entra ID.OwnerId
- Specifies the ID of an owner.
Parameters
-GroupId
Specifies the ID of a group in Microsoft Entra ID.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-OwnerId
Specifies the ID of an owner.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |