Hello GlennMaxwell,
The commands are correct, you can check them here:
https://learn.microsoft.com/en-us/powershell/module/dnsserver/add-dnsserverresourcerecorda?view=windowsserver2019-ps
and
https://learn.microsoft.com/en-us/powershell/module/dnsserver/add-dnsserverresourcerecordcname?view=windowsserver2019-ps
First ensure that you have the RSAT installed on your Windows machine
- Run: DISM.exe /Online /Get-Capabilities
2, install the RSAT by copying the Capability name and composing the command , example: DISM.exe /Online /add-capability /CapabilityName:Rsat.GroupPolicy.Management.Tools~~~~0.0.1.0 - Make sure that the DNS Module is correctly enabled by running the Powershell command: Get-Module DNSServer –ListAvailable
For modifying A HOST record, is not as simple, as it requires some scripting experience, because you can't just overwrite, but instead clone the record, assign new value, then remove the old one. Luckily for CNAME, just running Add-DnsServerResourceRecordCName with the new value will successfully overwrite.
For more info: https://learn.microsoft.com/en-us/powershell/module/dnsserver/set-dnsserverresourcerecord?view=windowsserver2019-ps
Hope this helps,
Best regards,