I need a tool or utility to change the IP address on the PC.
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
Answers (1)
Please log in to answer
Posted by:
Byoung4now
18 years ago
Wiser,
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("192.168.1.1")
subnet = Array("255.255.255.0")
RetVal = Adapter.EnableStatic(ipaddr,subnet)
If RetVal = 0 then
WScript.Echo "DHCP disabled, using static IP address"
Else
WScript.Echo "DHCP disable failed"
end If
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("192.168.1.1")
subnet = Array("255.255.255.0")
RetVal = Adapter.EnableStatic(ipaddr,subnet)
If RetVal = 0 then
WScript.Echo "DHCP disabled, using static IP address"
Else
WScript.Echo "DHCP disable failed"
end If
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.