Muokkaa

Jaa


Remove-MsolDomain

Removes a domain from Azure Active Directory.

Syntax

Remove-MsolDomain
      -DomainName <String>
      [-Force]
      [-TenantId <Guid>]
      [<CommonParameters>]

Description

The Remove-MsolDomain cmdlet is used to delete a domain from Azure Active Directory. The domain being deleted must be empty. There cannot be any users or groups with email addresses in this domain.

Examples

Example 1: Remove a domain

PS C:\> Remove-MsolDomain -DomainName "contoso.com" -Force

This command attempts to remove the domain contoso.com without prompting you for confirmation. This operation fails if there are any users or groups that reference the domain.

Parameters

-DomainName

Specifies the fully qualified domain name (FQDN) of the domain to remove.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Force

Indicates that this cmdlet does not prompt you for confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:True
Accept wildcard characters:False