Exchange-Online-DKIM-rotation-for-all-domains.ps1
<#PSScriptInfo .VERSION 1.0 .GUID 97510708-a258-4c4e-b2e4-4acdb0ad840b .AUTHOR jan@cloud23.nl .COMPANYNAME .COPYRIGHT .TAGS .LICENSEURI .PROJECTURI https://github.com/IntuneAdmin/Exchange-Online-DKIM-rotation-for-all-domains .ICONURI .EXTERNALMODULEDEPENDENCIES .REQUIREDSCRIPTS .EXTERNALSCRIPTDEPENDENCIES .RELEASENOTES .PRIVATEDATA #> <# .DESCRIPTION ExchangeOnline DKIM Rotation for All Domains with DKIM True #> $organization = "<DOMAINNAME>.onmicrosoft.com" Connect-ExchangeOnline -ManagedIdentity -Organization $organization $customdomains = (Get-DkimSigningConfig | ? { $_.Domain -NotLike '*.onmicrosoft.com' -and $_.Enabled -like 'True' }).name $customdomains | foreach { $Rotate = Rotate-DkimSigningConfig -Identity $_ } |