DNS Records

Look up Azure DNS record-query examples using the custom CCMX.AzGraph.psm1 module. Later filters depend on the initial collection of all DNS records.

Link to AZURE PORTAL DNS SETTINGS:

POWERSHELL Returning DNS Records Using Powershell

Using Module CCMX.AzGraph.psm1

  1. GET All DNS Records From Azure
$allDNS = Get-XallSchoolDNSRecords
  1. GET ALL SPF Records
$SPF = Get-XallSchoolSpfRecords
  1. GET ALL DKIM Records

#Run point 1 so that $allDNS is set $DKIM = $allDNS | where {$_.Name -like "domainkey"} | select -exclude Id,ResourceGroupName,Etag,TargetResourceId | sort ZoneName,Name

#Display $DKIM | Format-Table

  1. GET ALL DMARC Records

#Run point 1 so that $allDNS is set

$DMARC = $allDNS | where {$_.Name -like "dmarc"} | select -exclude Id,ResourceGroupName,Etag,TargetResourceId | sort ZoneName,Name #Display $DMARC | Format-Table

  1. GET ALL PTR Records

#NOTE: PTR records are set by the ISP. Only needed for the public IP address of each site.

$PTR = Get-XallSchoolPtrRecords

#Display

$PTR | Format-Table

  1. GET ALL MX Records

#Run point 1 so that $allDNS is set

$MX = $allDNS | where {$_.RecordType -eq "MX"} | select -exclude Id,ResourceGroupName,Etag,TargetResourceId

#DISPLAY

$MX | Format-Table