Questions tagged [cim]
62 questions
0
votes
1 answer
How to Export Clustered Scheduled Task
I try to export the XML of a Clustered Scheduled Task.
I search for the function as Export-ScheduledTask has for non Clustered Tasks.
Maybe there is a way via CIM when i execute a Get-ClusteredScheduledTask I get this.
But I have no idea how to…

marcohald
- 43
- 1
- 6
0
votes
0 answers
Unable to start CIMSession
I've been breaking my head over this error. When I try to start a new CIMSession, it says it cannot find the computer. Ive verified that both computers are on the same network and that they both can talk to each other. I can ping both PCs from each…

frankjstrike
- 5
- 1
- 3
0
votes
1 answer
Powersell - Remotely Query if User Exists Across Domain [Fastest]
Abstract
So I work for a company that has roughly 10k computer assets on my domain. My issue is the time it takes to query if a user exists on a computer to see if they've ever logged into said computer. We need this functionality for audits in case…

Karmaxdw
- 163
- 1
- 4
- 13
0
votes
1 answer
Can I still use WMI Com API for C++ to get get CPU usage , Even though WMI is being deprecated?
I heard that WMI is being deprecated . Some say get-WMIObject is deprecated. What should I use to get System statistics like CPU usage , RAM etc USING C++. https://learn.microsoft.com/en-us/windows/win32/winrm/winrm-c---api "OR"
…

Metoirite Shower
- 1
- 1
0
votes
1 answer
How to use Microsoft.Management.Infrastructure in an application to determine which app has a file locked?
I've got Microsoft.Management.Infrastructure working in my application, at least as far as the very first sample code:
CimSession.Create(null)
.QueryInstances(@"root\cimv2", "WQL", "SELECT * FROM Win32_OperatingSystem")
…

Betty Crokker
- 3,001
- 6
- 34
- 68
0
votes
0 answers
Restrict parameter to specific type; when using CimInstance
Is there a sensible way to restrict the parameter type used for a function when it may be encapsulated in a CimInstance?
e.g. Say I have a method such as below:
function Add-DaclAce {
[CmdletBinding()]
[OutputType([System.Void])] #just for…

JohnLBevan
- 22,735
- 13
- 96
- 178
0
votes
1 answer
Calling CIM method requires a MI_STRINGA data type
From C# I am trying to call a CIM method:
string str = "1.1.1.1";
var param = new CimMethodParametersCollection();
...
param.Add(CimMethodParameter.Create("NotifyServers", str, CimFlags.In));
session.InvokeMethod(_NameSpace,…

Jan
- 323
- 2
- 9
0
votes
1 answer
Restart 2008 Server using PowerShell CIM
I can't seem to find a way to reboot a remote computer using CIM for a 2008 server. All I have found was Restart-PcsvDevice but this doesn't work for 2008 servers. Is there a way to use CIM to reboot 2008 servers? I have to use CIM because of the…

Keith
- 689
- 10
- 27
0
votes
1 answer
How to Use a CIM Methods Which are Not Implemented by WMI?
A project I'm working on at the moment involves a lot of messing around with hardware. Thus, I'm using a lot of WMI related code. I noticed on several MSDN pages, such as the Win32_Fan, that there are some CIM methods which are not implemented and…

Itai Bieber
- 11
- 2
0
votes
0 answers
Getting Current Reading of CIM_Tachometer in order to Get Fan Current Speed
I am working on a project which supposed to include computer's fans status. Most of the properties I need can be acquired from the Win32_Fan class. Sadly, I couldn't find a way to use this class for getting the current reading of the fan speed. In…

Itai Bieber
- 11
- 2
0
votes
1 answer
Decoding a Date in cim_bioselement that is clear in the WMI equivalent?
In powershell, if i do (gwmi win32_bios).releasedate | convertto-json, I get "20171221000000.000000+000", which makes sense - Dec. 21, 2017.
But if I take the equivalent element in the CimInstanceProperties list, e.g.,
$a = (Get-CimInstance…

aggieNick02
- 2,557
- 2
- 23
- 36
0
votes
2 answers
Get-CimInstance repeats output multiple times
I'm trying to get a last boot time report and my script keeps out repeating the same output 8 times, I'm sure its a syntax error. Here is what I have:
$ServerName = (Get-Content -Path
D:\Users\Admin.sa\Desktop\Computerlist.txt)
##### Script Starts…

Slyons
- 117
- 4
- 20
0
votes
0 answers
WMI/CIM: Unable to access class
I have a non-standard WMI namespace/class I'm trying to access, but am unable to by conventional means. I can see the class when I use the -List parameter, and can assign/access the class when using -List | Where-Object Name -eq 'Class', but am…

Maximilian Burszley
- 18,243
- 4
- 34
- 63
0
votes
0 answers
Powershell and SCCM - Unable to make a INNER JOIN query with CIM (__GENERIC CLASS error)
I am currently working on a Powershell module to help my colleage and I to works more "seemlessly" with SCCM and script (since the SCCM Cmdlets are way too slow, and therefore unusable).
In this module, I have created a function called…

Patrick Pruneau
- 669
- 3
- 7
- 14
0
votes
2 answers
What is the difference between CIM_USBDevice, CIM_USBHub, and Win32_USBHub?
What is the difference between the CimClass(es) CIM_USB_Device and CIM_USBHub? They both emit the same type and appear to produce the same set of objects?
PS C:\src\t> Get-CimInstance CIM_USBDevice | % { $_.Name }
USB Root Hub (USB 3.0)
Generic USB…

lit
- 14,456
- 10
- 65
- 119