vbscript and WMI to set IP Address for a workstation 
Author Message
 vbscript and WMI to set IP Address for a workstation

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



Wed, 24 Dec 2003 11:11:41 GMT  
 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



Thu, 25 Dec 2003 01:53:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Workstation IP Address

2. Workstation IP Address

3. IP Address for NT Workstation 4.0 SP3

4. VBscript for IP Address, Mac Address, Username

5. Get IP Address with WMI

6. Using WMI to get the computers IP address ?

7. How to get IP Address with WMI and JScript

8. About Get IP Address through WMI !

9. change static ip address remotely via WMI

10. change ip address remotely via WMI

11. wmi and IP address

12. WMI and IP address

 

 
Powered by phpBB® Forum Software