[Solved] VBScript using WMI to find out SQL Server version

Based on the code in the first Google search result here: Dim WMI, Col, Prod, Q Set WMI = GetObject(“WinMgmts:”) Q = “Select * FROM Win32_Product WHERE Vendor = ” & _ “‘Microsoft Corporation’ AND Name LIKE ‘SQL Server%Database Engine Services'” Set Col = WMI.ExecQuery(Q) For Each Prod in Col if left(Prod.version, 3) = “11.” … Read more

[Solved] WMI lib to start windows service remotely

There is documentation regarding the library on github: https://github.com/tjguk/wmi/blob/master/docs/cookbook.rst I believe the above code is throwing an error because you are not specifying which service to start. Assuming you don’t know what services are available to you: import wmi c = wmi.WMI() # Pass connection credentials if needed # Below will output all possible service … Read more