adding multiple DNS entries using powershell (V3)

I am trying to add multiple DNS entries on many servers and I want to create a powershell script that I can run on all the servers.

The entries would be as such

location 1

name-VM 10.10.9.1

name-iLO 10.10.9.6

name-GW 10.10.9.254

location 2

name-VM 10.10.12.1

name-iLO 10.10.12.6

name-GW 10.10.12.254

any advice would be much appreciated

August 20th, 2015 5:23am

Dear,

You can use the

Set-DNSClientServerAddress

CmdLet to set the DNS on your servers

I am using:

Set-DNSClientServerAddress -InterfaceAlias "<NIC NAME>" -ServerAddresses (<NS1>),(<NS2>) | Out-Null 

in my scripts.

See https://technet.microsoft.com/en-us/library/jj590768(v=wps.620).aspx for the full description.

I hope that's what you were looking for.

Regards,

Remco Vermeer

Free Windows Admin Tool Kit Click here and download it now
August 20th, 2015 6:56am

Start by reading the help and looking carefully at all of the examples.

DNS Cmdlets are only available on Windows Server 2012 and later:

https://technet.microsoft.com/en-us/library/JJ649850.aspx?f=255&MSPPError=-2147217396

August 20th, 2015 7:23am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics