When running Invoke-SpfDkimDmarc with -Server specified as anything the server is not provided to any function. Whatever DNS server is configured on the computer running the script will be used, this causes issues in split-brain scenarioes where the internal DNS is different from the external.
I've included the specified server in $Splat and provided that to Get-SPFRecord and Get-DMARCRecord. Get-DKIMRecord is already provided this due to the selector.
When running Invoke-SpfDkimDmarc with -Server specified as anything the server is not provided to any function. Whatever DNS server is configured on the computer running the script will be used, this causes issues in split-brain scenarioes where the internal DNS is different from the external.
I've included the specified server in $Splat and provided that to Get-SPFRecord and Get-DMARCRecord. Get-DKIMRecord is already provided this due to the selector.