Syntax

$ErrorActionPreference= ‘silentlycontinue’
Install-Module PartnerCenter
Install-Module MSOnline
Install-Module AzureAD

Connect-MsolService
$tenant = Get-MsolPartnerContract -All | Select-Object TenantId
‘there are ‘ + $tenant.Count + ‘ tenant’
$d = 0

$Result = foreach ($ids in $tenant.TenantId) {

Download Full Script

The .txt file will display record names as below:

DKIM Selector 1 CNAME Record

DKIM Selector 2 CNAME Record

DMARC TXT Record

SPF TXT Record

Purpose:The purpose of this script is to check whether DKIM/DMARC/SPF records are created for each of the tenant's verified domains
Modification:-
Type:PowerShell Script (ps1)
Compatibility:Windows
Tags:None
Reference link:

Quickly Check and Manage your Exchange Online DNS Records for SPF, DKIM and DMARC with PowerShell