Display failure options (VBScript)
This code can be found in
Chapter 2 of Windows Server Cookbook
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.
' This code displays the current failure and recovery settings.
' ---------------------------------------------------------------
' From the book "Windows Server Cookbook" by Robbie Allen
' ISBN: 0-596-00633-0
' ---------------------------------------------------------------
' ------ SCRIPT CONFIGURATION ------
strComputer = "." ' e.g. rallen-srv01
' ------ END CONFIGURATION ---------
set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colRecoveryConfig = objWMI.InstancesOf("Win32_OSRecoveryConfiguration")
for each objConfig in colRecoveryConfig
Wscript.Echo objConfig.Name
Wscript.Echo " Auto reboot: " & objConfig.AutoReboot
Wscript.Echo " Debug File Path: " & objConfig.DebugFilePath
Wscript.Echo " Debug Type: " & objConfig.DebugInfoType
Wscript.Echo " Expanded Debug File Path: " & objConfig.ExpandedDebugFilePath
Wscript.Echo " Kernel Dump Only: " & objConfig.KernelDumpOnly
Wscript.Echo " Overwrite Existing: " & objConfig.OverwriteExistingDebugFile
Wscript.Echo " Send Admin Alert: " & objConfig.SendAdminAlert
Wscript.Echo " Write Debug Info: " & objConfig.WriteDebugInfo
Wscript.Echo " Write to System Log: " & objConfig.WriteToSystemLog
next
|
This code has been viewed 970 times.
|
New from the creators of TechTasks.com:
StatSheet.com
|