Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.58 KB

access-wmi-provider-for-configuration-management-using-wql.md

File metadata and controls

34 lines (25 loc) · 1.58 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Use WQL to access the WMI Provider
Use this example to see how to run Windows Management Instrumentation Query Language statements for the WMI Provider for Computer Management in SQL Server.
markingmyname
maghan
03/14/2017
sql
wmi
reference
query language [WMI]
WMI Query Language [WMI]
WQL [WMI]
WMI Provider for Configuration Management, WQL

Access WMI Provider for Configuration Management using WQL

[!INCLUDE SQL Server] This section describes how to execute [!INCLUDEmsCoName] Windows Management Instrumentation Query Language (WQL) statements against the WMI Provider for Computer Management.

The example uses a WQL editor, WBEMtest.exe, to run WQL queries against the WMI Provider to enumerate [!INCLUDEssNoVersion] services, network protocols, and aliases.

Querying services using WBEMtest

  1. From the Start menu, click Run, and then enter WBEMtest.

  2. The WBEMtest.exe dialog appears. Click Connect.

  3. In the first text field, type the WMI Provider for Computer Management namespace: root\Microsoft\SqlServer\ComputerManagement11. Click Connect.

  4. Click Query. Type a query that returns the current services running on the local computer: SELECT * FROM SqlService. Click Apply.

  5. Further refine the query by adding WHERE ServiceName = "MSSQLSERVER".