Skip to content

How to do a Forceful Domain Admin take over in Office 365

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
A picture containing screenshot, drawing
Description automatically generated
$msolcred = get-credential
A screenshot of a cell phone
Description automatically generated

Next step is to connect to the MSOL Service with the specified credentails.

Connect-MSolService -Credential $msolcred
A picture containing screenshot
Description automatically generated

Now that a session has been establisehd to Office 365 , run the follwoing to list the current domains.

Get-MsolDomain
A picture containing bird
Description automatically generated
A picture containing screenshot, drawing
Description automatically generated

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
A screenshot of a cell phone
Description automatically generated

When the command completes sucesfull, you will then see the Domain listed with the status as Unverified.

A screenshot of a computer screen
Description automatically generated

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.

A close up of a logo
Description automatically generated

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
A screenshot of a cell phone
Description automatically generated
A screenshot of a cell phone
Description automatically generated

Lets verify if the Domain is in a verified state.

Get-MsolDomain
A picture containing blue, white, woman, man
Description automatically generated

We can now see that the domain is now in a Verified State.

A picture containing bird
Description automatically generated

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

#ThatLazyAdmin

Sharing is caring!

Published inOffice 365Teams

2 Comments

  1. Nima Nima

    Thanks for the great post.
    It really helped me.

Leave a Reply

Your email address will not be published.