I am reading about Get-CimInstance at Get-CimInstance (CimCmdlets) - PowerShell | Microsoft Learn
My terminal is configured to use PS7, when I run example 5,
$instance = @{
ClassName = 'Win32_Process'
Namespace = 'root/cimv2'
Properties = @{
Handle = 0
}
Key = 'Handle'
ClientOnly = $true
}
then
$x = New-CimInstance @instance
I get the following error:
New-CimInstance: A parameter cannot be found that matches parameter name ‘Properties’.
I changed poperties y property, it does not error but whatever handle I give it returns the same output
$instance = @{
ClassName = 'Win32_Process'
Namespace = 'root/cimv2'
Property = @{
Handle = 10 (tried 1, 2....)
}
Key = 'Handle'
ClientOnly = $true
always output