Script to validate your Office 365 DNS records



Get-Office365DNSRecords.ps1 is a simple script for Office 365, that makes you quickly validate if your have configured your DNS records for use with Office 365 services.

It creates two report, one listed directly within the PowerShell prompt and a more detailed report which is saved to a file.

Example of the prompted report for e.g.

No autodiscover record found for
MX Records found for
SIP TLS Records found for
SIP Federation TLS Records found for
No SIP record found for
Lyncdiscover Record found for
No MSOID record found for

This script scans a CSV file for a list of domains and then scans each domain for DNS records that may indicate which Office 365 services is setup in DNS. So add your domains to the CSV file and you are ready to validate.

Download my script here:

Download is available on TechNet Gallery, download link above, will redirect you to TechNet Gallery. Please post comments regarding the script on this page, thx.

About Author

Peter is an Exchange specialist with over 15+ years of experience with Exchange Server and certified Microsoft Certified Master (MCM) and Microsoft Certified Solutions Master (MCSM) on Exchange Server. He has been awarded the Microsoft MVP award, every year since 2007. He is active in the Microsoft community and User Group Leader for CoLabora (a danish UC & Cloud User Group). He works as an Cloud & Infrastructure Architect and Consulent, with primary focus on Exchange, Office 365, Azure and Skype for Business.


  1. Peter,

    This is great, but I wondered about 2 things. Is it possible to get the appropriate DNS records via powershell? Meaning, if I don’t know the MX record, rather than guessing, can you run a powershell to find out what it should be? Secondly, for 2 test domains, using your script, the results showed missing MX, autodiscover and a few others and all of those records do exist. Any reason why?

Copyright 2005-2015 - Peter Schmidt.