kman28_9999
asked on
Is there a way to reset all network adapters in Windows XP?
I need to find a way to reset all physical network connections on a Windows XP System. This needs script or executable will be run at logoff to diconnect it the connection from a cisco CAM server.
I found the WMI script below but I need a way to reset all of the devices.
I found the WMI script below but I need a way to reset all of the devices.
arrComputers = Array(")
For Each strComputer In arrComputers
WScript.Echo
WScript.Echo "=========================================="
WScript.Echo "Computer: " & strComputer
WScript.Echo "=========================================="
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
' Obtain an instance of the the class
' using a key property value.
Set objShare = objWMIService.Get("Win32_NetworkAdapter.ReplaceKeyProperty=ReplacePropertyValue")
' no InParameters to define
' Execute the method and obtain the return status.
' The OutParameters object in objOutParams
' is created by the provider.
Set objOutParams = objWMIService.ExecMethod("Win32_NetworkAdapter.ReplaceKeyProperty=ReplacePropertyValue", "Reset")
' List OutParams
Wscript.Echo "Out Parameters: "
Wscript.echo "ReturnValue: " & objOutParams.ReturnValue
Next
ASKER
The physical adapter will need to be disconnected. Release renew will not work with the cisco NAC.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "ipconfig release /all"
rem oShell.run "ipconfig renew /all"
Set oShell = Nothing