Enable dead gateway detection (VBScript)
This code can be found in
Chapter 1 of Windows Server 2003 Networking Recipes
Purchase XP Cookbook or Networking Recipes for only $25 plus shipping! While supplies last.
Find out how to download all of the VBScript code from this site.
' From the book "Windows Server 2003 Networking Recipes"
' This code enables dead gateway detection for all configured network adapters.
' ------ SCRIPT CONFIGURATION ------
strComputer = "."
boolEnable = TRUE ' set to FALSE to disable
' ------ END CONFIGURATION ---------
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration")
objSettings.SetDeadGWDetect(boolEnable)
WScript.Echo "Dead gateway detection set to " & boolEnable
|
This code has been viewed 1410 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|