I have been asked to create a script that our level 1 and 2 support staff can use to change the name of a device and assign a new IP address to that device. I have the NetDom “RenameComputer” command to change the device name on the PC and in active directory. Now I need a tool or utility to change the IP address on the PC. We use static IP and the OS is Windows XP. I am using a dialog box to populate a variable in the script with the IP that is needed. Anyone have any ideas? I do not know VB script but use SMS installer script or Wise.
0 Comments   [ + ] Show Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.


Here is a script to enter the static address. Just make input boxes where ever you need it like for the ipaddress to enter.

Set Adapter = GetObject("winmgmts:Win32_NetworkAdapterConfiguration=1")
ipaddr = Array("")
subnet = Array("")

RetVal = Adapter.EnableStatic(ipaddr,subnet)

If RetVal = 0 then
WScript.Echo "DHCP disabled, using static IP address"
WScript.Echo "DHCP disable failed"
end If
Answered 12/19/2005 by: Byoung4now
Senior Yellow Belt

Please log in to comment
Answer this question or Comment on this question for clarity