Examples/Sample_xService_DeleteService.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<#
    .SYNOPSIS
        Stops and then removes the service with the name Service1.
#>

Configuration Sample_xService_DeleteService
{
    [CmdletBinding()]
    param
    ()

    Import-DscResource -ModuleName 'xPSDesiredStateConfiguration'

    Node localhost
    {
        xService ServiceResource1
        {
            Name = 'Service1'
            Ensure = 'Absent'
        }
    }
}