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
Need to get the details of all the Antivirus installed in Win 7 machine
I need to find the list of all the installed Antivirus in Windows 7 machine. I am using WMI. I am not able to get the list of all the AV. Its showing only 1 AV.
I am not able to know how to loop in to get all the AV.
Below is my sample code.
…

iggy
- 31
- 1
- 8
0
votes
1 answer
What is the best way to check Windows License Status using WMI query
I'm trying to find out the best way to check Windows License status using WMI query. The query should return one row indicating the license status and I want it to be as general as possible so that I can run it on many computers and different…

Marcin
- 33
- 2
- 8
0
votes
1 answer
Communicating with non-English WMI
I recently discovered that WMi is localized. This means that my WQL queries and returned results are sometimes incorrect because of commas/dots in numbers. Since there are many users with German/French/Japanese windows, this must be a problem…

JohnEye
- 6,436
- 4
- 41
- 67
0
votes
2 answers
get-wmiobject sql join in powershell - trying to find physical memory vs. virtual memory of remote systems
get-wmiobject -query "Select TotalPhysicalMemory from Win32_LogicalMemoryConfiguration" -computer COMPUTERNAME >>output.csv
get-wmiobject -query "Select TotalPageFileSpace from Win32_LogicalMemoryConfiguration" -computer COMPUTERNAME >>output.csv
I…

Willy
- 43
- 1
- 10
0
votes
1 answer
How to register for WMI events using Java
I am integrating window based application with java application and want to capture window events in java.
I found in google J-Interop is the library thorugh this can be achived.
i did some POC wih below code but facing issue while locating the…

ArmStrong
- 47
- 9
0
votes
1 answer
Get version of Service in WMI
I installed a windows service using InstallShields generated msi file.
How am I able to get the version of the service using WMI-Query? I already checked win32_Service but there's no version number displayed. Is this information queryable using WMI…

FRules
- 739
- 1
- 10
- 20
0
votes
1 answer
Getting Machine Serial Number With WMI Class
I wrote this part of c# WMI Code for getting MotherBoard serial Number
ManagementObjectSearcher ComSerial = new ManagementObjectSearcher("SELECT * FROM Win32_BaseBoard");
foreach (ManagementObject wmi in ComSerial.Get())
{
try
{
…

Hasan Yaman
- 13
- 1
- 1
- 4
0
votes
1 answer
Detect SD card using WMI Query
I have a query that return USB devices attached in:
SelectQuery sq = new SelectQuery("select DeviceID, Model from Win32_DiskDrive where InterfaceType='USB'");
ManagementObjectCollection MOC = new ManagementObjectSearcher(sq).Get();
But it…

Fher Devs
- 45
- 7
0
votes
1 answer
How to get Logical Disk for a specific Hard Disk using WMI?
I am currently working on a project where I need to use WMI (Windows Management Interface). I need to find the Hard Disks, and Logical Disks and some information about them. For example I use the following code to get the physical disk:
hd = new…

Arvind Ab
- 25
- 1
- 8
0
votes
1 answer
Selecting a single instance by using WMI query
I need to query the WMI for an object that I know to be a singleton (there is only one instance). I used to do that by a loop, but it doesn't look good:
var searcher = new ManagementObjectSearcher("root\\CIMV2\\Security\\MicrosoftTpm",
"SELECT *…

andrew.fox
- 7,435
- 5
- 52
- 75
0
votes
1 answer
Issue with WMI File Watcher Path on the Network
I am trying to get the right path on our network when using the WMI file watcher but keep getting error. Initially, I was using a sample path that I found from online but now it is not letting me using the correct path. Here is what I did for my…

moe
- 5,149
- 38
- 130
- 197
0
votes
1 answer
WMI query running very slow on a specific machine (local)
I have a WMI query that is SELECT * FROM win32_printer where name = 'My Printer'
It's running as a local query.
I'm testing it through WBEMTest and through the code written in C# and in all cases on a specific machine it is really slow (~1…

probably at the beach
- 14,489
- 16
- 75
- 116
0
votes
1 answer
get error wmi powershell op_Division:String
im trayng to run this script to send mail with info about the servers but i get this error:
Method invocation failed because [System.Object[]] does not contain a method named 'op_Division'.
At…

Zman
- 3
- 1
- 3
0
votes
2 answers
Better way to run WMI queries?
I do most of my scripting in VBScript and I often use WMI queries to get information from the system. The WMI ExecQuery method always returns a WMI collection object that I have to access from a For loop -- even in cases where you could only ever…

Wes Sayeed
- 177
- 2
- 12
0
votes
0 answers
Order Win32_NTLogEvent Query returns invalid query
In my c# code I have the following
string date = DateTime.Now.ToString("yyyyMMdd");
ObjectQuery queryError = new ObjectQuery("SELECT * FROM Win32_NTLogEvent WHERE Logfile = 'Application' AND (TimeGenerated > '" + date + "000000.000000-000' AND…

user3912327
- 1
- 1
- 7