Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Description
This example shows how you can use the ProcessSet composite resource to ensure multiple processes
are running.
With Ensure set to Present and Path set to the array of C:\Windows\System32\cmd.exe and
C:\TestPath\TestProcess.exe, the resource starts cmd.exe and TestProcess.exe without any
arguments if they're not already running.
With Invoke-DscResource
The Invoke-DscResource cmdlet doesn't support invoking composite resources. Instead, use the
WindowsProcess resource.
With a Configuration
This snippet shows how you can define a Configuration with a ProcessSet resource block to ensure
the cmd.exe and TestProcess.exe processes are running.
Configuration Start {
Import-DscResource -ModuleName 'PSDscResources'
Node localhost {
ProcessSet ExampleProcessSet {
Path = @(
'C:\Windows\System32\cmd.exe'
'C:\TestPath\TestProcess.exe'
)
Ensure = 'Present'
}
}
}