Using PowerShell to update DNS records

A little gem I came across when trying to add a bunch of new storage controllers to DNS (and not wanting to click through all the menus).

Caveat - only Windows Server 2012 and beyond

Unfortunately PowerShell in Windows 2008 seems quite limited in functionality - many highly useful cmdlets weren't implemented until Windows Server 2012.

Adding records with CLI
Add-DnsServerResourceRecordA -ZoneName mgtzone.company.local -Name filer01 -IPv4Address 192.168.1.2 -CreatePtr