Examples/Resources/SPServiceAppProxyGroup/1-ProxyGroups.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<#
.EXAMPLE
    This example creates two seperate proxy groups of service apps that can be
    assigned to web apps in the farm
#>


    Configuration Example 
    {
        param(
            [Parameter(Mandatory = $true)]
            [PSCredential]
            $SetupAccount
        )
        Import-DscResource -ModuleName SharePointDsc

        node localhost {
            SPServiceAppProxyGroup ProxyGroup1
            {
                Name                = "Proxy Group 1"
                Ensure              = "Present"
                ServiceAppProxies   = "Web 1 User Profile Service Application","Web 1 MMS Service Application","State Service Application"
            }

            SPServiceAppProxyGroup ProxyGroup2
            {
                Name                = "Proxy Group 2"
                Ensure              = "Present"
                ServiceAppProxiesToInclude = "Web 2 User Profile Service Application"
            }
        }
    }