Long delay trying to use EnableDHCP() method
From: Jamie (Jamie_at_discussions.microsoft.com)
Date: 09/23/04
- Next message: Michael Harris \(MVP\): "Re: Send message in batch mode via telnet"
- Previous message: Striffy: "Re: Windows XP login script problems with using If Exists"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 23 Sep 2004 16:15:03 -0700
Hello, we are trying to change static IP's to dynamic but experience long
(4hrs) when trying to use EnableDHCP() method as follows:
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objNetAdapter In colNetAdapters
errEnable = objNetAdapter.EnableDHCP()
If errEnable = 0 Then
Wscript.Echo "DHCP has been enabled."
Else
Wscript.Echo "DHCP could not be enabled."
End If
Next
Any ideas?
Thanks in advance
- Next message: Michael Harris \(MVP\): "Re: Send message in batch mode via telnet"
- Previous message: Striffy: "Re: Windows XP login script problems with using If Exists"
- Messages sorted by: [ date ] [ thread ]