October 2017
Intermediate to advanced
440 pages
11h 47m
English
The Invoke-CimMethod command may be used to call a method.
The CIM class can be used to find details of the methods 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