Powershell – How to update SOA values using PowerShell

domain-name-systempowershellwindows-server-2012

The Windows PowerShell module DnsServer allows managing a Windows DNS Server.

Is it possible to update the SOA record fields such as TTL, Refresh, Expires, etc using the DnsServer module?

To date I've only found a way via WMI to update SOA fields.

Best Answer

TTL and other cache settings can be updated using the Set-DNSServerCache cmdlet. Refresh can be configured using Set-DNSServerScavenging. If you are looking to update other fields, a handy exhaustive list of DNS Powershell cmdlets and how to use them can be found here.