Examples/Resources/SPSecurityTokenServiceConfig/1-SetConfiguration.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
<#
.EXAMPLE
    This example configures the Security Token Service
#>


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

        node localhost {
            SPSecurityTokenServiceConfig SecurityTokenService
            {
                Name                  = "SPSecurityTokenService"
                NameIdentifier        = "00000003-0000-0ff1-ce00-000000000000@9f11c5ea-2df9-4950-8dcf-da8cd7aa4eff"
                UseSessionCookies     = $false
                AllowOAuthOverHttp    = $false
                AllowMetadataOverHttp = $false
                PsDscRunAsCredential  = $SetupAccount
            }
        }
    }