Windows Management Instrumentation (WMI) is an API for managing the Windows operating system on local or remote computers.
Questions tagged [wmi]
4365 questions
1
vote
1 answer
Access Windows Server EC2 instance with WMI Exporter in Prometheus
does anyone know what i'm doing wrong here? i'm trying to access my windows-server 2019 ec2 node locally so i can successful collect metrics via WMI Exporter and point this at my prometheus instance.I'm trying to access port 9182 for WMI Exporter,…

user203818
- 43
- 7
1
vote
1 answer
Is there a faster way to query a remote filesystem with WMI?
I am trying to recursively get all of the files — 5 or 6 files give or take — under the directory C:\YC. I am bound to one WMI call to a remote computer.
I managed to do this call using the WQL LIKE operator but it's taking around 30 seconds, even…

Yiftach Cohen
- 39
- 1
- 4
1
vote
0 answers
Supplying Data to WMI by Writing a Provider
I am new to c++ and I am trying to develop a WMI provider in windows. After few searches I have come across a documentation of MSDN (https://learn.microsoft.com/en-us/windows/win32/wmisdk/supplying-data-to-wmi-by-writing-a-provider) I have followed…

SaKu
- 11
- 1
1
vote
2 answers
Get current memory utilisation of a process running on a remote machine with WMI
I want to write a VB script that will return the current memory utilisation of a process on a remote machine.
I'm currently getting the info by greping the output of pslist.exe but that's not ideal.

theaxe
- 119
- 1
- 2
- 11
1
vote
1 answer
How can i programmatically find out how many resources a IIS server has and the traffic on each resource .. etc
I want to write a program to find out what resources an IIS server has and how many hits are there on each resource. The resource can be anything from a html page to files like sound clips, pictures , etc. I want to find out a list of all these…

ritwik
- 11
- 2
1
vote
1 answer
Remove-WmiObject - Delete User Profiles
Here is the code to remove user profiles remotely with the following constraints/rules:
########## List of accounts/Student profiles older than 21 days and not test accounts to be deleted #######################
foreach ($computer in…

Rodrigo N M
- 97
- 4
- 13
1
vote
0 answers
Link Up/Down using VB script in windows 2019
I have tried to use the Enable() method from Win32_NetworkAdapter and Win32_PnPEntity class. But it only enable or disable the interface.
Set devices = WMIService.ExecQuery("SELECT * FROM Win32_PnPEntity WHERE DeviceID like '" &…

Jomin
- 113
- 2
- 8
1
vote
0 answers
WMI event subscription using [wmiclass] not working in Powershell Core
I've been trying to get code below running in Powershell Core for many hours, but it doesn't work. I need something like that if one program starts ( say regedit) it triggers another program to start, say notepad. (Note: I need to do this with code…

Louis Lenders
- 11
- 1
1
vote
0 answers
Why doesn't ThermalZoneInformation return the real temperatures?
Reproduce (or not):
using System;
using System.Management;
using System.Windows.Forms;
namespace WMISample
{
public class MyWMIQuery
{
public static void Main()
{
try
{
…

ispiro
- 26,556
- 38
- 136
- 291
1
vote
0 answers
C# - Write ManagementEventWatcher query with condition?
What I have now is WMI watcher:
ManagementEventWatcher processStartEvent =
new ManagementEventWatcher("SELECT * FROM Win32_ProcessStartTrace");
I need to filter the query by multiple process names Whats the correct syntax?

Boppity Bop
- 9,613
- 13
- 72
- 151
1
vote
1 answer
WMI: Getting weird value from Win32_OperatingSystem table
I faced an issue using WMI with C++.
It is the first time I've used it so I took the basic documentation example. But running it doesn't work for me.
I tried to extract the OS Name from Win32_OperatingSystem but, when I display it, I got 0x9a2fec.
I…

RUBILAX
- 35
- 1
- 6
1
vote
2 answers
Remote WMI query failing with 'A security package specific error occurred' when using Azure Active Directory user
I'm attempting to query a remote machine with the PowerShell cmdlet: Get-WmiObject and using credentials for a user in Azure AD that has the Azure AD joined device local administrator role and the IAM role assignment of Virtual Machine Administrator…

landerson_block
- 31
- 8
1
vote
0 answers
WMI Remote Process Cannot Query Parent (Access Denied)
I have a .NET process that delegates work to other servers by creating a remote worker process on those servers and then sending the work over a TCP port. That all works fine, but I would like the remote worker processes to 'monitor' the parent…

Aaron M. Eshbach
- 6,380
- 12
- 22
1
vote
0 answers
"Access Denied" error in WMI Get API in a web application
I have a web application and I need to access some configuration information in a Windows service running on the same server. What I have works locally but not when deployed to server.
I understand the application runs using aspnet.exe worker…

NoBullMan
- 2,032
- 5
- 40
- 93
1
vote
2 answers
.vbs to tell time with Sapi but not interrupt given some open processes
I have composed a .vbs file with near zero knowledge of this coding language (with major code from here and here). I put this together to get my computer to tell me the time every 15 minutes (combined with task scheduler). The trickiest part was to…

daileyco
- 743
- 5
- 13