Technical Log
VB - Enable DHCP
VB - Enable DHCP
Search




hits.Login
purpleender
41467
Newmarket
Bumder
Jock
Gonna get High till the day I die! Reality is an illusion that occurs due to lack of resin.
strComputer = "."
errEnabled = False
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
For Each objNetAdapter In colNetAdapters
If objNetAdapter.DHCPenabled = true then
Wscript.Echo " DHCP has been enabled."
Else
Wscript.Echo "DHCP could not be enabled."
End If
Next


