Questions tagged [wql]

The WMI Query Language (WQL) is a subset of the American National Standards Institute Structured Query Language (ANSI SQL)—with minor semantic changes.

Windows Management Instrumentation Query Language (WQL) is Microsoft's implementation of the CIM Query Language (CQL), a query language for the Common Information Model (CIM) standard from the Distributed Management Task Force (DMTF). It is a subset of the standard ANSI SQL with minor semantic changes. A basic WQL query remains fairly understandable for people with basic SQL knowledge.

WQL is dedicated to WMI and is designed to perform queries against the CIM repository to retrieve information or get event notifications

198 questions
1
vote
2 answers

SCCM WQL Query - List version of a specific installed application?

I'm struggling to create a WQL query for SCCM as I'm really new and rarely use it in a complex manner. My goal is to list 3 things : Computer name - Display Name ("Google Chrome") - Display Version (of that Google Chrome entry) I'm starting with…
Rakha
  • 1,874
  • 3
  • 26
  • 60
1
vote
0 answers

Search For Win32_Directory using the Volume Guid

I am trying to check if a directory exists on a remote computer by using the Volume GUID rather than the Volume Name. Is there any way in WMI to accomplish this? I have a tried a few different approaches but my WQL syntax never seems to be correct,…
cmcginty
  • 235
  • 1
  • 3
  • 9
1
vote
0 answers

C++ How to know in which IRQNumber is associated a device?

I try to determine in which IRQNumber a specific device is associated. Then, when I have the IRQNumber, I want to list all the devices which are on this IRQ to see if the specific device is the only one on this IRQ or if it shares it. Thanks to the…
Lo.M
  • 11
  • 2
1
vote
0 answers

Export a WMI data into a file and display it in UI

I'm a beginner to the Windows Management Instrumentation(WMI). I'm working on WMI with C++ to collect data from the Windows log files("Security logs being accessed in this program"). I was able to read and display the contents in the log file using…
Anand
  • 69
  • 1
  • 7
1
vote
1 answer

c# get result from wql inner join with SCCM 2016

From Task Sequence I need to have 2 informations in 2 different classes public static readonly string TSPackageClassString = "SMS_TaskSequencePackage"; public static readonly string TSContainerItem = "SMS_ObjectContainerItem"; My WMI Query …
1
vote
1 answer

VBA code to find all hidden folders in directory with WQL and store it in xml file

I managed to get all the hidden folders now and the only problem is to store all the information about it into the xml file. Can anyone help me with this? Dim xdoc Function CreateFolders(objFile) Dim elem Dim attr set elem =…
Nick
  • 11
  • 3
1
vote
1 answer

WMI query local administrators including group members

I know how to fetch a list of local administrators on a remote machine via WMI: wmic /Node:"ComputerName" path win32_groupuser where (groupcomponent="win32_group.name=\"administrators\",domain=\"Computername\"") This will return users and…
Mark Richman
  • 28,948
  • 25
  • 99
  • 159
1
vote
2 answers

query on Win32_NTLogEvent WHERE Logfile = 'Security' works only on remote machine

I've have a problem using the code below to retrieve data from the security log event of my local machine. I tested on various computers: the local machine is a windows xp sp3. The query has no error but it returns 0 record. For remote machines it…
AlessandroG
  • 318
  • 5
  • 14
1
vote
1 answer

Using WQL query from SCCM in powershell

I have a query in SCCM that will take a printer IP address and return all workstations in SCCM that have the printer installed on it. I am wanting to create a powershell script that will take said query and use the workstations that it returns to…
Ozar
  • 61
  • 3
  • 9
1
vote
1 answer

Input string was not in a correct format in WQL query

I get the following error : [WMI Event Watcher Task] Error: An error occurred with the following error message: "Input string was not in a correct format.". When I Execute WQL Query : SELECT * FROM __InstanceCreationEvent WITHIN 10 WHERE…
Anyname Donotcare
  • 11,113
  • 66
  • 219
  • 392
1
vote
1 answer

How to Properly Escape Quotes in WMI Query

I have the following WMI Query, which polls whetehr a file has been created in C:\test : Select * From __InstanceCreationEvent Within 1 Where TargetInstance Isa "Cim_DirectoryContainsFile" and…
Bassie
  • 9,529
  • 8
  • 68
  • 159
1
vote
2 answers

Parsing different date strings into one format in VBNet

I'm trying to write a program that will pull a list of all installed windows updates and output the date of the most recent install. I'm hitting a wall due to the format outputted from the WMI query. My code is below: Dim dates = New List(Of…
Will Ryan
  • 661
  • 1
  • 7
  • 17
1
vote
0 answers

Powershell WMI WQL Query

I am trying to create a permanent event subscription that executes a power shell script when a USB device is plugged in (event code 2006), however for some reason it won't run when it should, or at all. i am almost certain the code that is the issue…
deeps
  • 25
  • 4
1
vote
1 answer

How can you detect that instances from different WMI Classes are the same?

If I have two different classes for example Win32_PerfFormattedData_Tcpip_NetworkInterface and Win32_PerfRawData_Tcpip_NetworkInterface can I somehow figure out if they return same instances? In my example I know they return data for the same…
ragezor
  • 360
  • 1
  • 4
  • 16
1
vote
0 answers

Powershell: WQL output data not loading

Below is my WQL query. $SCCMQuery = @' Select UAR.User, UAR.Application, UAR.CurrentState from sms_fullcollectionmembership as FCM INNER JOIN SMS_UserApplicationRequest as UAR ON UAR.User=FCM.SMSID where FCM.CollectionID="a\\100104" '@ $Request =…
Roxx
  • 3,738
  • 20
  • 92
  • 155