Examples/Resources/SPUserProfileServiceApp/2-NoILMUsed.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
33
34
35
36
37
38
<#
.EXAMPLE
    This example adds a new user profile service application to the local farm
#>


    Configuration Example 
    {
        param(
            [Parameter(Mandatory = $true)]
            [PSCredential]
            $SetupAccount,

            [Parameter(Mandatory = $true)]
            [PSCredential]
            $FarmAccount
        )
        Import-DscResource -ModuleName SharePointDsc

        node localhost {
            SPUserProfileServiceApp UserProfileServiceApp
            {
                Name                 = "User Profile Service Application"
                ApplicationPool      = "SharePoint Service Applications"
                MySiteHostLocation   = "http://my.sharepoint.contoso.local"
                ProfileDBName        = "SP_UserProfiles"
                ProfileDBServer      = "SQL.contoso.local\SQLINSTANCE"
                SocialDBName         = "SP_Social"
                SocialDBServer       = "SQL.contoso.local\SQLINSTANCE"
                SyncDBName           = "SP_ProfileSync"
                SyncDBServer         = "SQL.contoso.local\SQLINSTANCE"
                EnableNetBIOS        = $false
                NoILMUsed            = $true
                FarmAccount          = $FarmAccount
                PsDscRunAsCredential = $SetupAccount
            }
        }
    }