Examples/Resources/SPWebApplicationAppDomain/1-Example.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 shows how to set the app domain for a specified web application
#>


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

        node localhost {
            SPWebApplicationAppDomain Domain
            {
                AppDomain = "contosointranetapps.com"
                WebApplication ="http://portal.contoso.com";
                Zone = "Default";
                Port = 80;
                SSL = $false;
                PsDscRunAsCredential = $SetupAccount
            }
        }
    }