Remove-EntraDomain
Removes a domain.
Syntax
Remove-EntraDomain
-Name <String>
[<CommonParameters>]
Description
The Remove-EntraDomain
cmdlet removes a domain from Microsoft Entra ID.
Important:
- Deleted domains are not recoverable.
- Attempts to delete will fail if there are any resources or objects still dependent on the domain.
The work or school account needs to belong to at least the Domain Name Administrator
Microsoft Entra role.
Examples
Example 1: Remove a domain
Connect-Entra -Scopes 'Domain.ReadWrite.All'
Remove-EntraDomain -Name Contoso.com
This command removes a domain from Microsoft Entra ID.
Parameters
-Name
Specifies the name of the domain to remove.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |