strIPaddr=Array("XXX,xXX,XXX,XXX")
strSNMask=Array("XXX,xXX,XXX,XXX")
strGateway=Array("XXX,xXX,XXX,XXX")
strPWINS="XXX,xXX,XXX,XXX"
strSWINS="XXX,xXX,XXX,XXX"
strPDNS= "XXX,xXX,XXX,XXX"
strSDNS= "XXX,xXX,XXX,XXX"
strDNSServer=Array(strPDNS, strSDNS)
Set objService=GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objEnumerator=objService.ExecQuery("Select * From
Win32_NetworkAdapterConfiguration Where DatabasePath IS NOT NULL")
objService.Security_.impersonationlevel = 3
For Each objInstance in objEnumerator
intStatus=objInstance.SetWINSServer (strPWINS, strSWINS)
intStatus=objInstance.SetDNSServerSearchOrder(strDNSServer)
intStatus=objInstance.EnableStatic (strIPaddr, strSNMask)
intStatus=objInstance.SetGateways(strGateway)
Next