Query over the content of CIM repository on Windows Machines that uses WQL (Windows Management Instrumentation Query Language ).
Questions tagged [wmi-query]
545 questions
0
votes
1 answer
WMI Querying Thread Events - No results
I`m investigating the WMI classes: Win32_Thread, Win32_ThreadTrace, Win32_ThreadStartTrace, Win32_ThreadStopTrace for possible usage.
The only one that returns any data is Win32_Thread. The rest do not return anything, no matter how I tried to…

Mecanik
- 1,539
- 1
- 20
- 50
0
votes
1 answer
SWbemServices.ExecQuery - "Invalid Parameter" when adding a WHERE clause
I have the following JavaScript to execute a WMI query on a remote Windows host:
var wmiLocator = WScript.CreateObject("WbemScripting.Swbemlocator");
var wmiService = wmiLocator.ConnectServer(host, "root\\cimv2", user, pass);
var items =…

pdinklag
- 1,241
- 1
- 12
- 28
0
votes
1 answer
local path of a share using wmi c#
I'm trying to make an .exe , that can list me the physical path(using WMI query)of a shared folder from the shared s name .
I'm trying to add the name of the share to the query as a 'Filter' (where )
I'm having issues with the query and get an…

prider
- 23
- 5
0
votes
1 answer
problems with WMI asynchronic call
if i use the absolute default setup for a WMI asynchronic query:
mgtEvWatcher = new ManagementEventWatcher("SELECT * FROM __InstanceOperationEvent WITHIN 1 WHERE TargetInstance ISA 'Win32_Process'");
mgtEvWatcher.EventArrived += new…

Bruno Figares
- 9
- 4
0
votes
1 answer
retrieving WMI query information in uint16 format c#
I've been trying to retrieve information about remote computers in our network via a WMI query. This works fine for all the info I need, I just don't seem to get the UserFriendlyName from the WmiMonitorID class. As this value is stored as a…

Krstf
- 3
- 2
0
votes
0 answers
Jenkins windows node frequently disconnecting with ERROR: Message not found for errorCode: 0xC00000AC for wmi connection
My Jenkins nodes are frequently disconnecting with below error
Windows nodes and connected via WMI method
My job nearly take 12 hours of time to complete , its a test job, download maven packages from artifactory.
Error Details
ERROR: Message not…

sid 539
- 1
- 1
0
votes
0 answers
WMIC command for installed software via registry key
I am trying to run a WMIC command to query all installed software on a machine (NOT POWERSHELL) I'm currently getting a but stuck on the correct syntax though. This is what I have so far and it is returning an ERROR: Retrieve Result Data.
wmic -U…

Simon Dodd
- 1
- 1
0
votes
1 answer
Different results from WMI query dependent on user account?
If I run the following query against WMI:
\\.\root\ccm\ClientSDK
Select * from CCM_Application where InstallState = "Installed"
when run as a local account (elevated) I get back, say 26 results, when run as the local SYSTEM account (from a Windows…

GoldieLocks
- 845
- 7
- 22
0
votes
1 answer
How to monitor folder for file that begins with variable string in VBS
I have the following code in a VBS file. How can I monitor files in Folder1\Folder2\Folder3\2020 for files that begin with a specific string
file_starts_with = "abc" & Year(Now()) & " " & Month(Now()) & " " & Day(Now())
Set objWMIService =…

kindofhungry
- 434
- 6
- 17
0
votes
1 answer
How to use variable name in WMI service query in VBS
How can I put the current year in CURRENT_YEAR so the folder I am monitoring is P:\\\\Folder1\\\\Folder2\\\\Folder3\\\\2020
I have the following code in a vbs file:
Set objWMIService =…

kindofhungry
- 434
- 6
- 17
0
votes
1 answer
Can WMI query a class property and filter using another class property?
I am a WMI noob. I'm using BGInfo and have a device with 2 NICs. I'm trying to query the IP address of one of the NICs. I want to submit a query based on the name of the NIC.
However, I'm running into an issue where the IP address is stored in…

Izzo
- 4,461
- 13
- 45
- 82
0
votes
2 answers
strange WMI query result
The code below shows the result (compiler: VS 2008)
Connected to ROOT\CIMV2 WMI namespace
OS Name : Microsoft Windows XP
Professional|C:\WINDOWS|\Device\Harddisk0\Partition1
is this correct? The code is copied from here with a few modifications as…

yolo
- 2,757
- 6
- 36
- 65
0
votes
0 answers
ManagementObjectSearcher not finding Network Drive using LogicalDisk filter in VS
Trying to capture the serial number of a remote disk drive. PowerShell will list the mapped network drive using Win32_LodicalDisk; Windows Management Instrumentation Tester lists the drive; The drive is listed in HKCU\Network; But running…

DigAtRandom
- 11
- 4
0
votes
1 answer
Unknown tcp states being returned by MSFT_NetTCPConnection CIM Query
Overview
The method below queries the MSFT_NetTCPConnection CIM instance and returns a list of TCP Connections on the target machine. This is the CIM instance that underlies the powershell Get-NetTCPConnection command.
Problem
I noticed that I get…

MplsAmigo
- 985
- 6
- 21
0
votes
1 answer
How to query for VM features using WMI class Msvm_SummaryInformation or Msvm_VirtualSystemManagementService in C++
This is code snippet from MSFT documentation
https://learn.microsoft.com/en-us/windows/win32/wmisdk/example--getting-wmi-data-from-the-local-computer
The example uses Win32_OperatingSystem and it works fine. I replaced Win32_OperatingSystem with…

Santhosh Kumar
- 381
- 1
- 5
- 13