- When you try to remove the domain through the Office 365 portal, you receive the following error message:Domain has associated subdomains.
- When you try to remove the domain by using Windows PowerShell, you receive the following error message:Remove-MsolDomain : You cannot remove a domain that has subdomains. You must first delete the subdomains before you can remove this domain.
At line:1 char:18
+ Remove-MsolDomain <<<< -DomainName <DomainName>
+ CategoryInfo : OperationStopped: (:) [Remove-MsolDomain], MicrosoftOnlineException
+ FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.DomainHasChildDomainException,Microsoft.Online.Administration.Automation.RemoveDomain
For example, consider the following scenario:
- You have two domains: www.contoso.com and contoso.com.
- You want to remove the contoso.com domain.