Remove-EntraAdministrativeUnit
Removes an administrative unit.
Syntax
Remove-EntraAdministrativeUnit
-AdministrativeUnitId <String>
[<CommonParameters>]
Description
The Remove-EntraAdministrativeUnit
cmdlet removes an administrative unit from Microsoft Entra ID. Specify AdministrativeUnitId
parameter to delete an administrative unit.
To delete 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
Connect-Entra -Scopes 'AdministrativeUnit.ReadWrite.All'
$administrativeUnit = Get-EntraAdministrativeUnit -Filter "DisplayName eq '<administrative-unit-display-name>'"
Remove-EntraAdministrativeUnit -AdministrativeUnitId $administrativeUnit.Id
This command removes the specified administrative unit from Microsoft Entra ID.
-AdministrativeUnitId
parameter specifies the ID of an administrative unit.
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 |