Modify DNS Records via Powershell

Over the past few months I’ve been doing a lot of work with VMware Horizon 6. I’m not going to go into details, as VMware has done a great job doing that, plus I’m under a NDA. Suffice to say, details that have been provided suffice if you’re just looking for info.

In my company sponsored lab environment, I have HWS 1.8 deployed in feature/option parity compared to production. Deploying a second instance of HWS (perhaps a pre-release version), is challenging, due to DNS/Reverse DNS Checks that are done.

Anyways – the reason you’re probably here is to find out how to systematically modify DNS records, so here ya go!

To create the A Record Test-A-Record with IP 192.168.100.100 to DNS Server corp-dns-1 in zone corp.internal, use the following command:

To remove the same record, run the following command:

So, in order to switch between environments, you can use the following snippets:

Switch From Original state to Alternate Environment:

Revert Back to original state:

Hope this helps!

Source: MS Technet

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Copyright VirtJunkie.com © 2020