examples/CISService.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#Requires -module CISDSC

<#
    .DESCRIPTION
    CISService will consider disabled or absent to be desired state for a given service. If the service is found not be in desired state it will be stopped and disabled.
#>


Configuration MyService
{
    Import-DSCResource -ModuleName 'CISDSC' -Name 'CISService'

    node 'localhost'
    {
        CISService 'Disable browser service'
        {
            Name = 'browser'
        }
    }
}

MyService
Start-DscConfiguration -Path '.\MyService'-Verbose -Wait