Changing desktop TCP/IP settings

D

Dmitry

Hello,

I am exploring the options of changing TCP/IP settings on multiple
Windows 2000 clients in a pure Win2000 environment with Active
Directory.

Currently, all clients are configured with a static IP address. I
would like to change that to "Obtain IP address automatically" without
having to visit every desktop.

Can I accomplish this with a GPO or a login script that runs a
registry hack?
Any other ideas?

Thank you in advance.

Dmitry
 
S

Stew Basterash

Use a WMI script (VBscript or Jscript)... If you don't get a resolution
contact me directly...
 
A

Andrew Mitchell

(e-mail address removed) (Dmitry) said
Hello,

I am exploring the options of changing TCP/IP settings on multiple
Windows 2000 clients in a pure Win2000 environment with Active
Directory.

Currently, all clients are configured with a static IP address. I
would like to change that to "Obtain IP address automatically" without
having to visit every desktop.

Can I accomplish this with a GPO or a login script that runs a
registry hack?
Any other ideas?


I have just done this myself on 500 workstations. Just create a batch file
(I called mine dhcp.cmd) with the following commands and set it as a
startup script using GPO.


if not exist c:\dhcp.txt goto end

netsh interface ip set address "Local Area Connection" dhcp > c:\dhcp.txt
netsh interface ip set DNS "Local Area Connection" dhcp
netsh interface ip set WINS "Local Area Connection" dhcp

netsh interface ip set address "Local Area Connection 2" dhcp
netsh interface ip set DNS "Local Area Connection 2" dhcp
netsh interface ip set WINS "Local Area Connection 2" dhcp

netsh interface ip set address "Local Area Connection 3" dhcp
netsh interface ip set DNS "Local Area Connection 3" dhcp
netsh interface ip set WINS "Local Area Connection 3" dhcp

netsh interface ip set address "Local Area Connection 4" dhcp
netsh interface ip set DNS "Local Area Connection 4" dhcp
netsh interface ip set WINS "Local Area Connection 4" dhcp

:end


The first line combined with the piping in the first netsh command ensures
that the script will only run once, making subsequent logins faster. If you
need to make the script run again for some reason, just delete the dhcp.txt
file on the users c: drive.
This will change the first 4 LAN adaptors to use DHCP. I really only needed
to hit the first 2 adaptors (most of our adaptors are called Local Area
Connection 2 because we build the machines from a ghost image which already
contains connection 1, then add the actual adaptor that actually exists on
the machine) but the script will handle up to 4. If you have more than
that, just add additional lines to the script. Any that don't exist just
error then continue on, but as it's running as a startup script the user
never sees the error.

Regards

Andy
 

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