var wbemFlagReturnImmediately = 0x10; var wbemFlagForwardOnly = 0x20; var arrComputers = new Array("."); for (i = 0; i < arrComputers.length; i++) { WScript.Echo(); WScript.Echo("=========================================="); WScript.Echo("Computer: " + arrComputers[i]); WScript.Echo("=========================================="); var objWMIService = GetObject("winmgmts:\\\\" + arrComputers[i] + "\\root\\CIMV2"); var colItems = objWMIService.ExecQuery("SELECT * FROM Win32_WMISetting", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); var enumItems = new Enumerator(colItems); for (; !enumItems.atEnd(); enumItems.moveNext()) { var objItem = enumItems.item(); WScript.Echo("ASPScriptDefaultNamespace: " + objItem.ASPScriptDefaultNamespace); WScript.Echo("ASPScriptEnabled: " + objItem.ASPScriptEnabled); try { WScript.Echo("AutorecoverMofs: " + (objItem.AutorecoverMofs.toArray()).join(",")); } catch(e) { WScript.Echo("AutorecoverMofs: null"); } WScript.Echo("AutoStartWin9X: " + objItem.AutoStartWin9X); WScript.Echo("BackupInterval: " + objItem.BackupInterval); WScript.Echo("BackupLastTime: " + WMIDateStringToDate(objItem.BackupLastTime)); WScript.Echo("BuildVersion: " + objItem.BuildVersion); WScript.Echo("Caption: " + objItem.Caption); WScript.Echo("DatabaseDirectory: " + objItem.DatabaseDirectory); WScript.Echo("DatabaseMaxSize: " + objItem.DatabaseMaxSize); WScript.Echo("Description: " + objItem.Description); WScript.Echo("EnableAnonWin9xConnections: " + objItem.EnableAnonWin9xConnections); WScript.Echo("EnableEvents: " + objItem.EnableEvents); WScript.Echo("EnableStartupHeapPreallocation: " + objItem.EnableStartupHeapPreallocation); WScript.Echo("HighThresholdOnClientObjects: " + objItem.HighThresholdOnClientObjects); WScript.Echo("HighThresholdOnEvents: " + objItem.HighThresholdOnEvents); WScript.Echo("InstallationDirectory: " + objItem.InstallationDirectory); WScript.Echo("LastStartupHeapPreallocation: " + objItem.LastStartupHeapPreallocation); WScript.Echo("LoggingDirectory: " + objItem.LoggingDirectory); WScript.Echo("LoggingLevel: " + objItem.LoggingLevel); WScript.Echo("LowThresholdOnClientObjects: " + objItem.LowThresholdOnClientObjects); WScript.Echo("LowThresholdOnEvents: " + objItem.LowThresholdOnEvents); WScript.Echo("MaxLogFileSize: " + objItem.MaxLogFileSize); WScript.Echo("MaxWaitOnClientObjects: " + objItem.MaxWaitOnClientObjects); WScript.Echo("MaxWaitOnEvents: " + objItem.MaxWaitOnEvents); WScript.Echo("MofSelfInstallDirectory: " + objItem.MofSelfInstallDirectory); WScript.Echo("SettingID: " + objItem.SettingID); } } function WMIDateStringToDate(dtmDate) { if (dtmDate == null) { return "null date"; } var strDateTime; if (dtmDate.substr(4, 1) == 0) { strDateTime = dtmDate.substr(5, 1) + "/"; } else { strDateTime = dtmDate.substr(4, 2) + "/"; } if (dtmDate.substr(6, 1) == 0) { strDateTime = strDateTime + dtmDate.substr(7, 1) + "/"; } else { strDateTime = strDateTime + dtmDate.substr(6, 2) + "/"; } strDateTime = strDateTime + dtmDate.substr(0, 4) + " " + dtmDate.substr(8, 2) + ":" + dtmDate.substr(10, 2) + ":" + dtmDate.substr(12, 2); return(strDateTime); }