Remove-EntraGroupOwner
Removes an owner from a group.
Syntax
Default (Default)
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.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ObjectId |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
-OwnerId
Specifies the ID of an owner.
Parameter properties
| Type: | System.String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
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.