PowerShell – and how to add new DNS servers to remote systems

Well, I’ve been playing around with PowerShell today. I had the task to move (as in change the IP address) two domain controllers into another VLAN. I could have done it the easy way and added the DNS servers by hand (by RDP’ing to each system having these particular DNS servers configured) – which wouldn’t have been very hard considering the domain only has 7 members at this point …

I wanted to do it the proper way, so I ended up asking old uncle Google, and it supplied me with the answers I was looking for.

Now, I executed those few PowerShell lines before changing the IP address of both domain controllers ( being the old IP and being the new one). After that I changed the IP address on the second (and after a short downtime) on the first domain controller. After both were restored and available again (and I checked with repadmin /showrepl), I ran the script again, this time only setting the new DCs:

Well, considering the time I spent on looking for this and the time I would have needed to change even the seven members – even this is a time saver.

Recent downtime

Well, you might have noticed that barfoo.org hasn’t been available for the last week or so … I had to change the DNS provider (thanks at this point again to Bene from xnull.de for putting me up as long as he did).

Sadly my new provider, when purchasing the domain hosting, doesn’t allow sub-domains. So after opening a service ticket with them, they switched me into a webhosting contract which allows sub-domains (wtf…).

And since today, everything should be available again. If you notice something missing/not working give me a holler.