February 2019
Intermediate to advanced
626 pages
15h 51m
English
The Invoke-CimMethod command may be used to call a method. The CIM class can be used to find details of the methods that a class supports:
PS> (Get-CimClass Win32_Process).CimClassMethods Name ReturnType Parameters Qualifiers ---- ---------- ---------- ---------- Create UInt32 {CommandLine...} {Constructor...}Terminate UInt32 {Reason} {Destructor...} GetOwner UInt32 {Domain...} {Implemented...}GetOwnerSid UInt32 {Sid} {Implemented...}
The method with the Constructor qualifier can be used to create a new instance of Win32_Process.
The Parameters property of a specific method can be explored to find out how to use a method:
PS> (Get-CimClass Win32_Process).CimClassMethods['Create'].ParametersName CimType Qualifiers---- ------- ...
Read now
Unlock full access