• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 648
  • Last Modified:

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.


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

Open in new window

0
kman28_9999
Asked:
kman28_9999
1 Solution
 
HainKurtSr. System AnalystCommented:
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "ipconfig release /all"
rem oShell.run "ipconfig renew /all"
Set oShell = Nothing
0
 
kman28_9999Author Commented:
The physical adapter will need to be disconnected. Release renew will not work with the cisco NAC.
0
 
Dennis JohnsonIT technicianCommented:
Microsoft's DevCon command-line utitlity should do the job for you: http://support.microsoft.com/kb/311272
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now