
vbscript and WMI to set IP Address for a workstation
The WMI docs (once again) document the arguments incorrectly. Your best bet is to use CIM Studio to
see what arguments and types are expected...
oAdapter.EnableStatic Array(ipAddr), Array(subnet)
--
Michael Harris
Microsoft.MVP.Scripting
--
Please do not email questions - post them to the newsgroup instead.
--
Quote:
> My codes is something like this:
> set
> oAdapter=GetObject("winntmgmt::Win32_NetworkAdapterConfiguration.Index=0")
> ipAddr="10.10.10.10"
> subnet="255.0.0.0"
> oAdapter.EnableStatic(ipAddr, subnet)
> I've searched everywhere trying to find code on how to use the WMI API to
> set the IP address.
> Please help and TIA!
> NB