Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
51 views

How to capture Task Scheduler Logs from Event Viewer Remotely using c#?

I am looking into capturing the event levels with information whether they are information/error/warning. So, I started to look into the WMI to access the PC remotely and it was able to connect to the ...
NeoGenesis521's user avatar
-1 votes
0 answers
16 views

Tips to speed up a 'Get-WmiObject' command

I'm running a simple WMI script against a list of devices in a text file to get total and free disk space. It works, but is VERY slow. I've searched through this site and others but my Google Fu is ...
Paul Disney's user avatar
1 vote
1 answer
106 views

How to get friendly name that belongs to an HMONITOR handle in Windows?

I need the friendly name that belongs to a handle of type HMONITOR. WMI allows me to list all the monitors connected with all the information I'll ever need, but how can I connect this information to ...
Robin's user avatar
  • 123
2 votes
0 answers
29 views

Error WBEM_E_INITIALIZATION_FAILURE from ExecMethod

I am trying to create a shadow copy of the C drive using wmivss. When I use the command line with wmic shadowcopy call create Volume='c:\', it successfully creates the shadow copy and returns the ...
K.Aguilar's user avatar
0 votes
0 answers
74 views

Uncheck "Allow the computer to turn off this device to save power" programatically in Windows 11

I have several computers with cameras connected to them via USB. I figured that after more than 30 hours of utilization, the cameras would disconnect from the computer. The reason seem to be related ...
Omnistic's user avatar
0 votes
1 answer
47 views

WMI query hangs and never finish

Good morning, I try to execute this command: Get-WmiObject Win32_OptionalFeature and never finish... How can I troubleshoot this? I try to recreate the repository but nothing works: net stop "...
Awachens's user avatar
0 votes
0 answers
30 views

PowerShell: CimInstance is impossible to remove. ObjectNotFound being raised even though it exists

Scenario When I run: Get-CimInstance -Namespace "root/subscription" -Query "Select * from __FilterToConsumerBinding" ...It clearly shows this CimInstance exists: Consumer ...
kragovip's user avatar
  • 476
0 votes
0 answers
19 views

WMI Query on __InstanceCreationEvent is invalid

Executing this query against ROOT\cimv2 namespace returns "invalid query" in WMI Explorer. Can anyone advise why this is malformed please? SELECT * FROM __InstanceCreationEvent WITHIN 5 ...
Cool Blue's user avatar
  • 6,476
1 vote
0 answers
38 views

Windows OS: Win32_PerfRawData_PerfProc_Process Virtual Memory is not matching with resource monitor's Commit Memory

I am trying to pull the Process metrics using Win32_PerfRawData_PerfProc_Process as documented at https://learn.microsoft.com/en-us/previous-versions/aa394323(v=vs.85) From the document, VirtualBytes ...
V SAI MAHIDHAR's user avatar
0 votes
0 answers
81 views

How to uninstall a driver from Device Manager using an object like winmgmts?

Both Win32_PnPEntity and Win32_PnPSignedDriver don't have methods to uninstall/remove/delete a driver. Is there a way to do it anyway? Maybe using another class? Or maybe a different object than ...
LWC's user avatar
  • 1,138
0 votes
1 answer
151 views

"System.Management currently is only supported for Windows desktop applications" error when dynamically loading a DLL in .NET 6

I'm using the "Microsoft.Windows.Compatibility" package to get the baseboard serial number in a .NET 6 application. My code looks like this: var searcher = new ManagementObjectSearcher("...
Mike Lopetgi's user avatar
0 votes
0 answers
63 views

Run MMI query on Ubuntu 2022 with .NET 8

I'm testing Microsoft.Management.Infrastructure (MMI) https://github.com/PowerShell/MMI. The code works fine on Windows, but it does not work on Ubuntu. Ubuntu version: 22.04.4 LTS Environment ...
magino's user avatar
  • 187
0 votes
0 answers
20 views

How to run the Win32_ScheduledJob, Create function in C#?

I want to create a C# function that connects to a given computer using WMI (CimSession), and schedule a given task at a given time. I decided to use the Win32_ScheduledJob class. public static string ...
A Guy C-L's user avatar
0 votes
0 answers
49 views

Is the any way to push Windows Event Forwarder logs to my java application irrespective of the platform(linux,mac,windows)

I have a java project I am trying to get events from WEF without using any agent. But this should be platform independent, I want to run my project in any OS. Please let me know if this is possible! ...
srinidhi's user avatar
0 votes
0 answers
55 views

using Powershell authorize WMI access from Computer A to Computer B

I have 2 computers A & B and I am Local Admin on both computers. I am using an application named VisualCron to remote execute a batch file from computer A (VisualCron) to computer B (Batch file) ...
user270488's user avatar
0 votes
0 answers
51 views

Wrong BitLocker Status Retrieval for Encrypted USB Drive Using WMI in C#

I'm trying to retrieve the BitLocker status of a USB drive using WMI in C#. I have written the following code to determine the protection status, conversion status, and encryption method of the drive. ...
Martina's user avatar
  • 811
0 votes
0 answers
33 views

How do I inquire into windows server about resources from a client java app

I'm building a balancer app using Java. This app will provide REST services to tell requesters which would be the best Windows server to use among some to do a certain job, . Those server will be ...
Mirco Malaguti's user avatar
0 votes
0 answers
38 views

Powershell process as administrator

I'm using following code to execute some powershell commands remotely: Invoke-WmiMethod -ComputerName $ComputerHost -Credential $cred -Class Win32_Process -Name Create -ArgumentList "powershell -...
Headbanging_coder's user avatar
1 vote
0 answers
74 views

Windows Performance Monitor (PerfMon) not showing same value as corresponding WMI class

I have a PowerShell script to get all performance counters based on a list of WMI classes. However, the result of the PowerShell script is not consistent to what I see in Performance Monitor (PerfMon)....
Qxlkdr's user avatar
  • 43
0 votes
1 answer
41 views

.NET Core + WMI - TIME_CREATED when detecting new process is wrong?

.NET Core app. I am detecting when a new process is created using WMI, with something like WqlEventQuery wqlEventQuery = new WqlEventQuery(string.Format("SELECT * FROM Win32_ProcessStartTrace&...
patsy2k's user avatar
  • 591
1 vote
2 answers
86 views

How do I retrieve domain user information from controller using WMI

I am working on a web controller to display and (ultimately) modify domain information for users. Ideally I want userName, full name, status (locked?) and whether they are logged in. I have gotten ...
Geoff's user avatar
  • 295
0 votes
1 answer
116 views

How to set network config to a Hyper-V VM with WMI?

I'm working on a WMI with Delphi, the goal is to set a VM IP with WMI. But something is going wrong on PUT. The ConnectServer function is connecting to local Hyper-V Host as administrator. Already had ...
Diego Carrilho's user avatar
0 votes
0 answers
117 views

Finding USB's device descriptor (more specifically the bcdUSB) without needing to install additional driver in C#

I am currently a little stumped as where to go next in my current project. First, here is some background. I am trying to identify the USB version of the attached devices (such as 1.0, 2.0, 3.0, etc), ...
Daniel F's user avatar
0 votes
0 answers
40 views

PowerShell and WMI Class reference

I'm trying to create a WMI class property in one class that references a property of an instance in another WMI class, using PowerShell. I've been having a hard time trying to figure out the correct ...
Pete Mitchell's user avatar
1 vote
0 answers
87 views

High WMI cpu usage when listening to events

I have written the code below to listen to creation and deletion events of when specific applications are created/deleted, and also retrieve their process name, id, command line, using WMI, ...
Katt's user avatar
  • 49
0 votes
0 answers
293 views

.NET 8: "System.Management currently is only supported for Windows desktop applications" when using WMI and target runtime "winx64"

We are getting this runtime error since we switched the target runtime for the publish process of our WinForms application from "portable" to "winx64" and when we use WMI functions,...
IngoB's user avatar
  • 2,911
0 votes
0 answers
83 views

What process is making Windows RPC calls?

A client computer is making remote RPC calls to server. The connection on client computer is initiated by the svchost.exe -k rpcss -p. This means that some ohter process has asked the rpcss to ...
Konrads's user avatar
  • 2,264
0 votes
0 answers
22 views

WMI speed degrades with time

We have server with several services, working there. They all write different perfomance counters and during last time (half a year maybe) I see that WMI work degrades with time: we restast server, ...
Shtasi's user avatar
  • 1
0 votes
0 answers
252 views

Running wmi queries as a non-admin user on a remote machine using C#

I am trying to use WMI to query system information on some clients on our network. We have successfully used administrator users to accomplish this in C# but now we want to switch to users without ...
senioradmin's user avatar
1 vote
0 answers
42 views

WMI from centos to remote host

In golang how i can do WMI based monitoring like Windows CPU, Windows memory, Disk monitoring using go library . Below code gives error package command-line-arguments imports github.com/StackExchange/...
M.K.S's user avatar
  • 71
0 votes
0 answers
43 views

Getting system info using WMI

Take this code: SYSTEM_INFO siSysInfo{}; GetSystemInfo(&siSysInfo); strHardwareInfo.AppendFormat(L" %s: %u\r\n", L"Number of processors", siSysInfo.dwNumberOfProcessors); ...
Andrew Truckle's user avatar
1 vote
2 answers
216 views

Getting Windows version 23H2 from Win32_OperatingSystem

Code: std::map<CString, CString> mapWindowsVersions { { L"22631", L"23H2" }, { L"22621", L"22H2" }, { L"22000", L"21H2" }, ...
Andrew Truckle's user avatar
1 vote
1 answer
51 views

How do I access a uint64 in a VARIANT structure?

How do I access a uint64 in a VARIANT structure? Eg: VARIANT vtProp{}; hres = pclsObj->Get(L"FreeSpaceInPagingFiles", 0, &vtProp, 0, 0); strSystemInfo.AppendFormat(L" Free Space ...
Andrew Truckle's user avatar
0 votes
0 answers
107 views

Associating WinRT DeviceInformation objects with WMI objects (Win32_PnPEntity)

The Windows.Devices.Enumeration namespace has functionality for watching device arrivals and utilizes the DeviceInformation class in the event callback to expose information about which device has ...
Scott's user avatar
  • 70
0 votes
1 answer
381 views

How to get "Capabilities" of a PnP device in PowerShell

Is there a WMI or PowerShell way to get the Capabilities of a Plug and Play device like a WebCam? I am looking for a programmatic way to enumerate or check if a Capability value, particularly ...
Kapil Kalra's user avatar
0 votes
1 answer
160 views

Only one ManagementEventWatcher process listens for events at a time

I have written a C# program that reads WMI Instance operation events in a particular namespace. Another third-party software (SCCM client 1) is responsible for creating these instances in the ...
Alakshendra Singh Yadav's user avatar
0 votes
0 answers
44 views

WMI ThreadsPerHost Quota exceeded

I have a server that is having application issues that seems to align with WMI showing the ThreadsPerHost quota was exceeded. Is there a way to tell what processes are keeping WMI threads open? I ...
Thomas's user avatar
  • 133
0 votes
1 answer
304 views

Get SCCM Deployment's Tab properties using PowerShelll

I am trying to get an Application Deployment's all tab properties using PowerShell command. Please see below image to get more idea about what I am talking about. [ Here, I need each setting of each ...
Ram Mansawala's user avatar
0 votes
0 answers
101 views

How to find type of PCI slots on windows server

I want to get PCI slot type information on windows similar to linux. On Linux when I run dmidecode -t slot I see output similar to # dmidecode 3.3 Getting SMBIOS data from sysfs. SMBIOS 3.2.1 present. ...
Deepali Joshi's user avatar
0 votes
0 answers
112 views

What event does Windows use to detect a drive has been unlocked by bitlocker?

The scenario is this: Open two instances of Windows explorer on a computer with a locked drive. Click on the drive in one of the windows and enter its BitLocker password. The drive unlocks, and the ...
ispiro's user avatar
  • 27.5k
0 votes
0 answers
121 views

Get number of RAM channels as a property of the system

I've found the WMI Win32_PhysicalMemory class which has an InterleaveDataDepth property. However, this is given per RAM stick, while the property is a system property, unlike InterleavePosition. So I ...
ispiro's user avatar
  • 27.5k
-1 votes
1 answer
131 views

How to fix IWbemLocator::ConnectServer returning E_ACCESSDENIED?

My goal is simple: to establish a WMI connection to a remote machine. A small test program shows that what was working since the WinXP era is now outdated. With WMI hardening update, WMI clients are ...
Bogudan's user avatar
  • 121
0 votes
1 answer
174 views

How can I find the COM-port using WMI for an Arduino using the CH340 chip

I'm writing code in C# for a Windows 10 machine. I'm using the class 'SerialPortManager.cs' from Paul van Dinther. It is using 'System.Management' and starts with scanning for connected USB Serial ...
Hans Billiet's user avatar
0 votes
0 answers
266 views

How to get PCI slot information for network adapters / NIC cards using python API like wmi on windows

On windows I want to find which network adapter in which slot. I found following powershell commands. Get-WmiObject -class "Win32_SystemSlot" which gives pci slot information ...
Deepali Joshi's user avatar
2 votes
1 answer
439 views

Access Denied trying to gather WMI information using C# ASP.NET but works in powershell

I am trying to query hardware data of computers on my local domain using WMI in a C# ASP.NET Application running on a server using IIS. After successfully opening a cim session using the New-...
senioradmin's user avatar
1 vote
0 answers
67 views

Preventing Scheduled Task from Running During Modern Standby

I'm encountering an issue with a compiled PowerShell script (packaged as an EXE) that is scheduled to run regularly on several computers. The script performs various checks, but I've noticed that it ...
Lukas's user avatar
  • 160
0 votes
0 answers
91 views

GPU SubVendor name Python

I'm using pythons wmi module for a lot of hardware specs of a system. I'd like to get the Graphics card SubVendor information. Like MSI, EVGA, XFX etc. I have not yet found a way to do this. Any ...
Sokoloft's user avatar
0 votes
0 answers
27 views

Clean up WMI processes after closing the app

I have a program that calls several WMI queries on different threads, like the code below. This code creates several WMI process, how can I close terminate those WMI processes when the application is ...
Juan Carlos Silva Rodriguez's user avatar
0 votes
0 answers
62 views

Can't create a process on a remote machine using WMI?

I'm having some troubles getting a program to start on another machine on my network. Both machines are running Windows 10 Home. Here is my full code: (The username and password have been removed for ...
AntAptive's user avatar
0 votes
1 answer
120 views

Finding Drive Letter by Disk Number, Partition Number, and Label using AutoIt

I'm working on an AutoIt script where I have the disk number, partition number, and label, and I need to find the corresponding drive letter. I've tried several approaches, but none seem to work ...
Muhammad Adeeb Rana's user avatar

1
2 3 4 5
88