Examples/Sample_xServiceSet.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Starts a set of existing stopped services

Configuration xServiceSetExample
{
    param (
        [String[]]
        $StoppedServiceNames
    )

    Import-DscResource -ModuleName xPSDesiredStateConfiguration

    xServiceSet ServiceSet1
    {
        Name = $StoppedServiceNames
        Ensure = "Present"
        State = "Running"
        StartupType = "Automatic"
        BuiltInAccount = "LocalService"
    }
}