October 2017
Intermediate to advanced
440 pages
11h 47m
English
The arguments for Win32_Process.Create include a ProcessStartupInformation parameter. The ProcessStartupInformation is described by a WMI class, Win32_ProcessStartup.
There are no existing instances of Win32_ProcessStartup (Get-CimInstance), and the class does not have a Create method (or any other constructor).
New-CimInstance can be used to create a class:
$class = Get-CimClass Win32_ProcessStartup $startupInfo = New-CimInstance -CimClass $class -ClientOnly
New-Object can also be used:
$class = Get-CimClass Win32_ProcessStartup $startupInfo = New-Object CimInstance $class
Properties may be set on the created instance; the effect of each property is documented on the MSDN:
https://msdn.microsoft.com/en-us/library/aa394375(v=vs.85).aspx ...
Read now
Unlock full access