Last updated on Apr 6, 2020
How to do a Forceful Domain Admin take over in Office 365
You can use the following process to do a forceful domain Admin take over if your domain has been added to an Office 365 Tenant and you have lost the details or a previous admin added your domain to a tenant and has left the organisation.
To get started, run the following to Install Msonline PowerShell Module and to prompt for Login credentials.
Install-Module -Name MSOnline
$msolcred = get-credential
Next step is to connect to the MSOL Service with the specified credentails.
Connect-MSolService -Credential $msolcred
Now that a session has been establisehd to Office 365 , run the follwoing to list the current domains.
Get-MsolDomain
From what we can see on the above step is that there is only the default “.onmicrosoft.com” domain.
Because the Domain is not listed, we can add it via PowerShell by running the following:
New-MsolDomain -TenantId f8a9f5a5-fbb5-9f67-84b9r9t74 -Name ThatLazyNerd.com
When the command completes sucesfull, you will then see the Domain listed with the status as Unverified.
Next we need to create a TXT record for this domain to get it verified.
Run the following.
Get-MsolDomainVerificationDns –DomainName ThatLazyNerd.com –Mode DnsTxtRecord
A new TXT record will be generated, this record needs to be added to your Public DNS provider. Once added it needs to be valided in Office 365.
Next we need to update the Public DNS with the TXT record, once that is done we need to run the following to confirm the TXT record and do a force take over.
To do a force domain take over run the following.
Confirm-MsolDomain –DomainName ThatLazyNerd.com –ForceTakeover Force
Lets verify if the Domain is in a verified state.
Get-MsolDomain
We can now see that the domain is now in a Verified State.
This is how you can easily get your domain back if it was added to another Office 365 Tenant and you do not have the details for it.
Happy sharing
[…] How to do a Forceful Domain Admin take over in Office 365 […]
Thanks for the great post.
It really helped me.