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
2
votes
4 answers

How to get total physical memory (ram) information in GB by WMI query?

I know how to get total physical memory from win32_computersystem class. but that comes in bytes or kb. I want this information in MB or GB. in wmi (wql) query. wmic also work. thanks in advance.
user2287201
  • 21
  • 1
  • 1
  • 2
2
votes
1 answer

WQL Like statement & syntax

I've seen atleast two other questions regarding WMI but none had an answer to my question, so here it is; I was experimenting with the WMI interface in my code. Basically this is what i have right now and it works. But it seems to me i could write…
wterbeek
  • 451
  • 9
  • 26
2
votes
2 answers

What is the difference between ManagementObject and ManagementBaseObject

When i Compiled the following both codes it gives same result (I think so). //ManagementObject : SelectQuery query = new SelectQuery("Win32_Environment"); ManagementObjectSearcher searcher = new ManagementObjectSearcher(query); foreach…
Gomathipriya
  • 905
  • 7
  • 19
  • 38
2
votes
4 answers

Joining two tables in WQL/SCCM

I think I'm being really stupid here. I'm using vbscript. I've connected to an SCCM server Set locator = CreateObject("WbemScripting.SWbemLocator") Set connection = locator.ConnectServer("SERVERNAME", "Root\SMS\SITENAME") I then have a WMI WQL…
Simon
  • 767
  • 3
  • 12
  • 22
2
votes
1 answer

Negative CPU Usage using TimeStamp_Sys100NS

I've looked at WMI, negative CPU usage value and Timestamp_Sys100NS in past but I am not doing anything with boot time only delta time between two readings. When CPU usage is very low i.e. System Idle Process shows as 99% I get Negative CPU usage…
Matt
  • 1,436
  • 12
  • 24
2
votes
1 answer

wmi event active window/focus window

Trying to trawl through the WMI/WQL MS Reference Data and the WMI Code Creator Event Classes, but can't find anything to indicate: A) If this is possible B) How to do it Ideally i'd like to be able to subscribe to WMI Events that are of the nature…
Dutimor
  • 45
  • 3
2
votes
1 answer

wmi invalid query error

I am trying to get the size of this dsa file present in c:\windows\ntds\ directory. I am getting error here, and I don’t know why. The error is “Invalid Query”. I seems to get this error quite often when I work with different WMI classes. I don’t…
sunder
  • 1,803
  • 4
  • 29
  • 50
1
vote
1 answer

WMI wql queries to fetch antivirus information

What are the different sql queries which can help in fetching installed antivirus information ? 1 query i know which tells antivirus name ( as shown in the code below ).what are the other information which we can fetch using wql queries? string…
Unbreakable
  • 7,776
  • 24
  • 90
  • 171
1
vote
0 answers

WMI ExecNotificationQuery using golang

I am using this go WMI package to monitor windows processes which are starting and stopping. I have see the example an implemented my own methods using Win32_Process and __InstanceCreationEvent and __InstanceDeletionEvent. Here is the sample for…
M. Javad Mohebbi
  • 415
  • 1
  • 3
  • 14
1
vote
1 answer

Get-WmiObject -Filter OR not working with NULL

These cmdlets work: Get-WmiObject Win32_PNPSignedDriver -Filter "DriverProviderName <> NULL" Get-WmiObject Win32_PNPSignedDriver -Filter "DriverProviderName <> 'Microsoft'" I can't seem to combine them with a OR statement & I don't know…
gregg
  • 1,084
  • 1
  • 12
  • 25
1
vote
0 answers

How can I query WMI GroupUser objects and select PartComponent attribute

I want to select Account attribute in this query example : SELECT Description, Disabled, Domain, FullName, Lockout, Name, SID FROM Win32_UserAccount WHERE Domain = '' I'm trying to get SELECT PartComponent FROM Win32_GroupUser WHERE…
1
vote
2 answers

WMI performance query

I am having an issue with a WMI query. I use a WMI query to search and resume an instance in BizTalk. When there are not that many instances (so when the data isn't that much) the query performs pretty good. But when the data is large (about 3000…
Rise_against
  • 1,042
  • 3
  • 15
  • 36
1
vote
0 answers

WMI Event Watcher not finding file?

I have a WMI Event watcher Task that watches for the creation of a file in a folder. When I run the package, I get no errors but the WMI task keeps running and never finds the file. I am watching a folder on a shared drive. My WQL query is as…
1
vote
3 answers

WQL/SCCM - Comparing version numbers correctly (less than...)

I'm having a problem with this part of a SCCM WQL query looking for "less than version 75.0.3770.80": ... where SMS_G_System_ADD_REMOVE_PROGRAMS.Version < "75.0.3770.80" If i'm not mistaken this is the good old problem seen before in other…
Rakha
  • 1,874
  • 3
  • 26
  • 60
1
vote
1 answer

How can I escape a right-curly brace ( } ) in a directory name of a WMI Win32_Directory query?

I'm trying to execute a WMI query that lists all the subdirectories in a directory on a different network-attached computer (server), but it's failing with a System.Management.ManagementException "Invalid query" exception. I am practically certain…
STLDev
  • 5,950
  • 25
  • 36