Query over the content of CIM repository on Windows Machines that uses WQL (Windows Management Instrumentation Query Language ).
Questions tagged [wmi-query]
545 questions
4
votes
2 answers
Get Bluetooth COM Ports
I am trying to access specific information about Bluetooth serial ports. I was able to find this window in my Bluetooth settings that showed me the port, direction, and name of a Bluetooth device if it was related to a COM Port.
Currently to try…

Dan
- 7,286
- 6
- 49
- 114
4
votes
2 answers
Is there a replacement or update for WmiSet for post-Delphi 2007?
We currently use WmiSet from Online Admin to run Wmi Queries and query registry settings on remote machines.
The problem is that it only supports Delphi up to RAD Studio 2007.
We are currently in the process of upgrading to Delphi XE and need to…

Pieter van Wyk
- 2,316
- 9
- 48
- 65
4
votes
1 answer
Monitoring Drives with WMI
I am trying to monitor drives a local PC. I am interested in two events: when the drive is connected (USB drive, CD-ROM, Network Drive, etc.) and disconnected. I wrote a quick proof of concept using the ManagementOperationObserver and it partially…

Martin
- 39,309
- 62
- 192
- 278
4
votes
2 answers
PowerShell/WMI power management
I'm new to Windows power management and even newer to WMI, but always welcome a learning opportunity.
Using PowerShell and WMI I want to set the "High Performance" power plan's "Lid close action", "Power button action" and "Sleep button action" to…

HairOfTheDog
- 2,489
- 2
- 29
- 35
4
votes
4 answers
WMI Process Watching uses too much CPU! Any better method?
I need to watch when certain processes are started or stopped on a Windows machine. I'm currently tapped into the WMI system and querying it every 5 seconds, but this causes a CPU spike every 5 seconds because WMI is WMI. Is there a better way of…
user43805
4
votes
1 answer
How to get power usage programmatically in Windows
I am working on a windows application(C#) to monitor computers. Are there any way to get current power usage in windows ?

Amit Kumawat
- 574
- 5
- 11
4
votes
2 answers
Schedule a task to monitor a certain process start
I'm trying to tie two applications together, so that when one is started the other starts too.
I expected to find this in Task Scheduler under Events > Application or something like that, but only some applications have event sources there.
So I…

Leeroy
- 2,003
- 1
- 15
- 21
4
votes
2 answers
Reference to type 'Component' claims it is defined in 'System'
Trying to get some WMI objects in a UWP application. Running VS2015 on .net 4.6.
I'm getting errors for the ForEach and method calls stating "Reference to type 'Component' claims it is defined in 'System'" with error CS7069.
using System;
using…

Luke Griffith
- 226
- 4
- 14
4
votes
1 answer
Wrong LastLogon returned from Win32_NetworkLoginProfile
Using WMI Explorer (or any other tool), the LastLogon timestamp for my user is showing an outdated value instead of the current date (since I'm currently using this PC):
SELECT * FROM Win32_NetworkLoginProfile
--
LastLogon =…

alexandrul
- 12,856
- 13
- 72
- 99
4
votes
1 answer
WMI:Getting Invalid Class Error when running shell command through another program
I am trying to get PCoIP Statistics which are available through WMI, I use following command for WMIC
wmic path Win32_PerfRawData_TeradiciPerf_PCoIPSessionNetworkStatistics
or with powershell
powershell Get-WmiObject -namespace "root\cimv2"…

user1064504
- 573
- 6
- 16
4
votes
6 answers
WMI - select from Win32_Product takes a long time
I am enumerating installed applications using WMI, and this block is taking a relatively long time to complete no matter how I structure it. It takes 13 seconds in my environment every time. Is there a better (faster) way to check if a program is…

invertigo
- 6,336
- 5
- 39
- 64
4
votes
1 answer
WMI giving me incomplete hardware info (PhysicalMemory)
I have read an almost exact same question regarding this issue already (WMI hardware, get RAM info), and here I'm hoping for more information on this topic.
I need to get various hardware information such as RAM serial number, hard drive SN, CPU SN,…

Sophia
- 155
- 2
- 13
4
votes
2 answers
Access WMI via Python from Linux
I'm looking for a way to access the WMI (Windows Management Instrumantation) from a Pythonscript remotely from a Linux machine (CentOS 6)
Of course there is the python-wmi package, but it uses the Windows API which isn't available on Linux.
I found…

0xAffe
- 1,156
- 1
- 13
- 29
4
votes
1 answer
Cannot access Win32_WinSAT from 32 bits process
When requesting Win32_WinSAT from a x64 process I get the correct results (WinSATAssessmentState = 1), but when executed from a x86 I get "results not available" (WinSATAssessmentState = 3)
x64 Powershell:
PS C:\Users\alive> gwmi…

Nombre Apellido
- 43
- 4
4
votes
2 answers
List all properties of WMI class in C++
Deos anyone know a way, in C++, to get a complete list of every property available within a given WMI class? I've found some similar questions here on SO, but they all use Powershell, VB, or C#.

gromeen
- 43
- 1
- 4