Examples/Resources/SPWeb/2-EnableAccessRequests.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 deploys a subsite in a specific location and enables
    access requests for this web
#>


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

        node localhost {
            SPWeb TeamSite
            {
                Url                      = "http://sharepoint.contoso.com/sites/site/subweb"
                Name                     = "Team Sites"
                Ensure                   = "Present"
                Description              = "A place to share documents with your team."
                Template                 = "STS#0"
                Language                 = 1033
                AddToTopNav              = $true
                UniquePermissions        = $true
                RequestAccessEmail       = "sample@contoso.com"
                PsDscRunAsCredential     = $SetupAccount
            }
        }
    }