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
Is there a way to manage Microsoft DNS *without* using WMI?
We have a need to manage our DNS records (add/update) remotely using C#... I know of and have written/implemented a solution using WMI but the problem is that WMI can be painfully slow.
I have come across the DNS Provider API used by the Microsoft…

Jason
- 565
- 1
- 6
- 18
1
vote
1 answer
WMI Query an Array which has an Object embedded
I am trying to write a PowerShell Script, which queries on a local Client the SCCM WMI Tree root\ccm\ClientSDK
we want to have the info was PostInstallaction an Application is using (Yes we know several other ways to find it out but we need it on…

crdy
- 43
- 9
1
vote
1 answer
How to extract a substring from the result of a WMI query in batch?
I have some WMI batch queries, this one gets the computer's (mostely laptops) processor information :
rem proc. info
setlocal enableDelayedExpansion
for /f "tokens=2 delims=," %%a in ('wmic cpu get Name^ /format:csv') do (
set PRCNAM=%%a
rem &&…

calade
- 35
- 3
1
vote
5 answers
C# System.Management has only 1 class?
I have been trying to utilize WMI for my code, I cannot use the System.Management classes as they are not there. I have tried it on 3.5 and 4 Net. Nothing works.
I have not found any solutions to the issue and was wondering if any of you have ever…

Meh
- 607
- 1
- 9
- 19
1
vote
0 answers
Python based .exe file running but not working on another machine and sometimes throwing wmi.py exception
I am trying to create an .exe file that would be called repeatedly by windows to kill a certain process in case it is running too long (it is stuck). I want it to be general, so it requires three command line parameters: number of minutes (as a…

Andy Kučerová
- 11
- 3
1
vote
1 answer
How does windows task manager performance tab fetches CPU GPU VPU and Memory utilization/Usage
where is the task manager is getting this data and how it is mapping to particular device.
basically i'm trying to write a script which fetches the CPU GPU VPU utilization from task manager. We have Psutil for cpu and we have Performance counter for…

Arbaz ali
- 84
- 6
1
vote
1 answer
WMI call to a different domain
Is it possible to read registry key of a remote machine which belongs to a different domain using WMI calls?

venki
- 35
- 6
1
vote
1 answer
Save variable from my PC to .txt file on Remote Windows Server using Python + WMI
I have a Python script on my PC with the variable x. I would like to write x's value to a .txt file on Remote Windows Server 2019.
I launched this Python code on my PC:
import wmi
x = 28
c = wmi.WMI(ip, user=username, password=password)
process_id,…

jobberman
- 25
- 3
1
vote
2 answers
How can I use the go language to specify the namespace of wmi when calling wmi?
I was asked to use the Go language to obtain some computer configurations of the local computer, such as CPU model and memory size,but there was a problem when getting some configurations.
When I get the basic CPU information, I use the following…

Jerry Dora
- 53
- 5
1
vote
1 answer
ManagementScope.Connect failing with error E_ACCESSDENIED error while being run from Windows Service
I am trying to connect to Windows WMI through service by filling the ManagementScope variables and trying to connect to remote machine. The Connect is succeeding if I am running as windows console, but failing when I am running the same code from…

coolcake
- 2,917
- 8
- 42
- 57
1
vote
0 answers
Powershell assign multiple ip addresses to adapter
I want to write a powershell script to create a loopback adapter and assign multiple ip addresses to it. You can see where I am getting the adapter and then have an if statement that works based on whether or not it already exists. In the if…

Dan
- 223
- 1
- 5
- 14
1
vote
0 answers
Query windows version including build number and revision?
I need to get full windows version, i.e. major, minor, build number and revison, so for example: 10.0.22000.1455 using golang app.
I tried using wmi - Win32_OperatingSystem class. Problem with this one is that it does not include revision, so what I…

JakubSliwinski
- 31
- 2
1
vote
0 answers
How do I create this query in C#
I am trying to perform this same WMI query from a C# function.
PS> Get-WMIObject - Namespace root/cimv2/mdm/dmmap - Class MDM_DevDetail_Ext01 - Filter "InstanceID='Ext' AND ParentID='./DevDetail'"
This is the C# code but I get an…

Duncan Groenewald
- 8,496
- 6
- 41
- 76
1
vote
1 answer
Display the remote computer name
This is a script to get the version of an installed software on remote computers.
Is there any way I can show the computer names in the result?
Please check the screenshot.
$pcname1 = 'TestServer1','TestServer2','TestServer3'
Get-WmiObject -Class…

Morriosn Jim
- 13
- 3
1
vote
1 answer
BrokenCimSession when stopping a scheduled task
When running the following on one of our Windows machine
$name = "My task"
Stop-ScheduledTask -TaskName $name -ErrorAction SilentlyContinue
I get this error:
Stop-ScheduledTask : Cannot connect to CIM server. The system cannot find the file…

ALOToverflow
- 2,679
- 5
- 36
- 70