Link to home
Start Free TrialLog in
Avatar of pradeepkaravadi
pradeepkaravadi

asked on

How to write a Startup Script to Add DNS Entries on Client PCs in Domain

Hi Have One Doman Controller and many Client PCs. I had added tow more Additional Domain Controller onto the Network. I want to update these two entries as additional DNS entries on all the client PCs. How to do that via Group Policy?
I want the below commands to be run at clients end when a user logs on :

netsh int ip set dns "local area connection" static 172.30.160.21 primary

netsh int ip add dns "local area connection" 172.30.160.22

netsh int ip add dns "local area connection" 172.30.160.23

These commands would manually add the three IPs as DNS. How do I get this enforced on all the PCs (round 300) whcih are under the same domain.?
Avatar of Brian Pierce
Brian Pierce
Flag of United Kingdom of Great Britain and Northern Ireland image

What are you trying to achive?
If you have added additional domain controllers then just add DNS to them (either via the Add/Remove programs, Windows Components, Network Services option, or the configure my server wizard. Assuming you are using AD integrtaed DNS the clients will automatically register themselves in DNS and DNS will automatically replicate to all DNS severs.
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pradeepkaravadi
pradeepkaravadi

ASKER

Then what do I do if I want this scirpt to be executed when a "normal" user logs on.
Again: this is nothing that can run on *user* logon; logon scripts run in the user's security context.
This has to be implemented as a *startup* script (this script will be executed with local system permissions) for execution during the computer start as I described above.