Trying to set listening IP address on Windows DNS Server automatedand thought it would be simple to use Set-DnsServerSetting, like Set-DnsServerSetting -ListeningIPAddress $ip ..
Think again, however this works:
$DSNServerSettings=Get-DnsServerSetting -ALL
$DNSServerSettings.ListeningIpAddress=@($ip)
Set-DNSServerSetting $DNSServerSettings
So retreive the DnsServerSetting Class, change the ListeningIP and write the sh1te back works.
#PowerShell #WindowsServer2022 #DNS #Settings #ListeningIP #GiveMeBind9Anytime