Remove-​Msol​Administrative​Unit

Deletes an administrative unit from Azure Active Directory.

Syntax

Remove-MsolAdministrativeUnit
      -ObjectId <Guid>
      [-Force]
      [-TenantId <Guid>]
      [<CommonParameters>]

Description

The Remove-MsolAdministrativeUnit cmdlet deletes an administrative unit from Azure Active Directory.

Examples

Example 1: Remove an administrative unit

PS C:\> $AdminstrativeUnit = Get-MsolAdministrativeUnit -SearchString "West Coast"
PS C:\> Remove-MsolAdministrativeUnit -ObjectId $AdminstrativeUnit.ObjectId -Force

The first command gets an administrative unit that matches a search string by using the Get-MsolAdministrativeUnit cmdlet. The command stores the administrative unit in the $AdminstrativeUnit variable.

The second command deletes the administrative unit. The command specifies the administrative unit by using the object ID of $AdminstrativeUnit. The command specifies the Force parameter. It does not prompt for comfirmation.

Required Parameters

-ObjectId

Specifies the unique ID of the administrative unit to remove.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Force

Indicates that this cmdlet does not prompt you for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TenantId

Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.

Type:Guid
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False