Loading |
VBScript |
JavaScript |
Powershell |
Search Options: WMI SqlService QueryContent of WMI SqlService Query.jsMD5 Hash: 3F058348B6363936953901ACBFB4DF24 |
||
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\\Microsoft\\SqlServer\\ComputerManagement10"); var colItems = objWMIService.ExecQuery("SELECT * FROM SqlService", "WQL", wbemFlagReturnImmediately | wbemFlagForwardOnly); var enumItems = new Enumerator(colItems); for (; !enumItems.atEnd(); enumItems.moveNext()) { var objItem = enumItems.item(); WScript.Echo("AcceptPause: " + objItem.AcceptPause); WScript.Echo("AcceptStop: " + objItem.AcceptStop); WScript.Echo("BinaryPath: " + objItem.BinaryPath); try { WScript.Echo("Dependencies: " + (objItem.Dependencies.toArray()).join(",")); } catch(e) { WScript.Echo("Dependencies: null"); } WScript.Echo("Description: " + objItem.Description); WScript.Echo("DisplayName: " + objItem.DisplayName); WScript.Echo("ErrorControl: " + objItem.ErrorControl); WScript.Echo("ExitCode: " + objItem.ExitCode); WScript.Echo("HostName: " + objItem.HostName); WScript.Echo("ProcessId: " + objItem.ProcessId); WScript.Echo("ServiceName: " + objItem.ServiceName); WScript.Echo("SQLServiceType: " + objItem.SQLServiceType); WScript.Echo("StartMode: " + objItem.StartMode); WScript.Echo("StartName: " + objItem.StartName); WScript.Echo("State: " + objItem.State); } } | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |