Group Policy to set DNS and Gateway

M

Maury

Hi,
I'm looking for a GPO to set DNS (multiple) and Gateway
WITHOUT using DHCP (I use static IP Addressing)...
Is it possible?

Thanks
 
D

Danny Sanders

Nothing that I'm aware of that is native to Windows server will do this
except DHCP.

hth
DDS
 
M

Mark Heitbrink [MVP]

Hi,
I'm looking for a GPO to set DNS (multiple) and Gateway
WITHOUT using DHCP (I use static IP Addressing)...
Is it possible?

Computer startup Script in combination with netsh.exe

It can´t be done with native GPO, because it´s a chicken and egg
problem ... which comes frist?

DNS is existential to have functional GPO infrastructure.
So you can´t manipulate it with GPO, it has to be the right one and
after it, changing to a wrong DNS, no GPO is longer apllying.
If GPO is not running, because of wrong DNS, how should it be fixed
by using GPO? ;-)

Mark
 
M

Maury

Mark Heitbrink [MVP] ha scritto:
Computer startup Script in combination with netsh.exe

netsh? I don't know this program... I'll search something about this.
It can´t be done with native GPO, because it´s a chicken and egg
problem ... which comes frist?

Right, but I have the need to set multiple DNS to my network
(>200 PC), I'm looking for a registry key, but I can't find it...

Thanks
 
M

Mark Heitbrink [MVP]

Hi,
netsh? I don't know this program... I'll search something about this.

open CMD -> netsh /? ;-) and the internal help, with a lot of examples.
http://support.microsoft.com/kb/242468
Right, but I have the need to set multiple DNS to my network
(>200 PC), I'm looking for a registry key, but I can't find it...

It´s in a genereated GUID inside HKLM, where every NIC on the differnent
PCs have different GUIDs. Thats why there is no chance to import a
regfile.

netsh uses the "lan connection" name, and this is usually on all PCs
the same. As an alternative you can use a VB/WMI script to achieve it.

Take a look at the "Portable Script Center" from Technet, 1.600 VB scripts,
there should be a solution inside ;-)

Mark
 
J

Jorge de Almeida Pinto [MVP - DS]

for DNS:
computer configuration\administrative templates\network\DNS client\"DNS
servers"
can also be done with NETSH in startup script

for gateway:
a startup script using NETSH

however, when you add a new computer to the domain while it just has an IP
without DNS how are you going to find a DC? you NEED DNS, even at the moment
when joining! (and at that moment you cannot use GPOs)


--

Cheers,
(HOPEFULLY THIS INFORMATION HELPS YOU!)

# Jorge de Almeida Pinto # MVP Windows Server - Directory Services

BLOG (WEB-BASED)--> http://blogs.dirteam.com/blogs/jorge/default.aspx
BLOG (RSS-FEEDS)--> http://blogs.dirteam.com/blogs/jorge/rss.aspx
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top