Remove-EntraAdministrativeUnitMember
Removes an administrative unit member.
Syntax
Remove-EntraAdministrativeUnitMember
-AdministrativeUnitId <String>
-MemberId <String>
[<CommonParameters>]
Description
The Remove-EntraAdministrativeUnitMember
cmdlet removes an administrative unit member in Microsoft Entra ID. Specify AdministrativeUnitId
and MemberId
to remove an administrative unit member.
To remove a member from an administrative unit, the calling principal must have at least the Privileged Role Administrator role in Microsoft Entra.
Examples
Example 1: Remove an administrative unit member
Connect-Entra -Scopes 'AdministrativeUnit.Read.All'
$AdministrativeUnit = Get-EntraBetaAdministrativeUnit -Filter "DisplayName eq '<administrativeunit-display-name>'"
$params = @{
AdministrativeUnitId = $AdministrativeUnit.ObjectId
MemberId = 'eeeeeeee-4444-5555-6666-ffffffffffff'
}
Remove-EntraAdministrativeUnitMember @params
This command removes a specified member (user or group) from a specified administrative unit.
-AdministrativeUnitId
parameter specifies the ID of an administrative unit.-MemberId
parameter specifies the ID of the administrative unit member.
Parameters
-AdministrativeUnitId
Specifies the ID of an administrative unit in Microsoft Entra ID.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MemberId
Specifies the ID of the administrative unit member.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |