Home > Batch Scripting, Microsoft, Windows > Activating Dhcp, The lazy way.

Activating Dhcp, The lazy way.

Recently i have been Re-Ip addressing our entire network due to our parent company enforcing new ip address ranges on us… /cryface

All has gone pretty smoothly for printers, no major complaints. The hp printers were re addressed very easily using HP WebJet admin. The remaining printers were just a matter of using the local console or telnet to change the Address’s.

The clients too, nice and simple. A quick change to DHCP had the new clients on the new range. Our friends (albeit hard to reach) in BT changed our MPLS bgp doodads to advertise the new address’s and setup cross communication between them!

The only issue i had was an isdn router that we had setup especially for one department, that filtered traffic accross it depending on ip address.

To cut a long story short, i had these statically assigned pc’s that i just did not want to go to one by one. So i decided to enable DHCP on these pc’s and reserve ip address’s so that any future changes could be done from the DHCP server.

To save me once again removing myself from my chair i decided to enable DHCP on these pc’s from remote using PSEXEC.

I found this article and this command on Petri that solved all my problems! It uses windows XP’s Netsh.

netsh interface ip set dns “Local Area Connection” dhcp

Be warned, it does disconnect them from the network while it renews the ip address. Funny that 😛

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: