Skip to content

SPSelfServiceSiteCreation

Yorick Kuijs edited this page Nov 8, 2018 · 9 revisions

SPSelfServiceSiteCreation

Parameters

Parameter Attribute DataType Description Allowed Values
WebAppUrl Key string The url of the web application
Enabled Required boolean Specifies if users are allowed to create site collections or not
OnlineEnabled Write boolean Specifies if site collections are created in SharePoint Online in a hybrid configuration. Hybrid configuration needs to be caried out seperately using the Hybrid Picker
QuotaTemplate Write string The quota template to apply to new site collections. Specify null to not apply any qouta template
ShowStartASiteMenuItem Write boolean Should the Start a Site link be displayed. Must be false or not specified if Enabled is false
CreateIndividualSite Write boolean Should Self Service Site Creation create an individual Site, false for a Site Collection
represent Write to Specifies the URL of the parent site where new sites are to be created. This is only used when CreateIndividualSite is true. Use [%userid%] to represent the ID of the user who is creating the site, for example: /projects/[%userid%]
PolicyOption Write string Specifies what site classification should be displayed MustHavePolicy, CanHavePolicy, NotHavePolicy
RequireSecondaryContact Write boolean Specifies if users needs to provide one or more additional site administrators
CustomFormUrl Write string Specifies a custom form URL to use for Self Service Site Creation. This is only used when CreateIndividualSite is true. Must be an absolute URL or empty to use built in form (_layouts/_layouts/15/scsignup.aspx)
InstallAccount Write PSCredential POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

Description

Type: Distributed Requires CredSSP: No

This resource is used to configure self-service site creation on a web application.

NOTE: The web application needs a root level ("/") site collection for the self-service site creation to function properly. It is not required to have this site collection present in the web application to succesfully configure this resource.

NOTE2: If Enabled is set to false, ShowStartASiteMenuItem is automatically set to false by the resource if ShowStartASiteMenuItem is not specified. Setting ShowStartASiteMenuItem to true at the same time as Enabled is set to false will generate an error.

Hybrid self-service site creation

It is possible to configure self-service site creation to create sites in SharePoint Online. This requires that hybrid self-service site creation is configured using the Hybrid Picker.

Examples

Example 1

This example shows how to configure self-service site creation for a web application

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

        node localhost {
            SPSelfServiceSiteCreation SSC
            {
                WebAppUrl               = "http://example.contoso.local"
                Enabled                 = $true
                OnlineEnabled           = $false
                QuotaTemplate           = "SSCQoutaTemplate"
                ShowStartASiteMenuItem  = $true
                CreateIndividualSite    = $true
                PolicyOption            = "CanHavePolicy"
                RequireSecondaryContact = $false
                PsDscRunAsCredential    = $SetupAccount
            }
        }
    }

Example 2

This example shows how to configure self-service site creation with a custom form for a web application

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

        node localhost {
            SPSelfServiceSiteCreation SSC
            {
                WebAppUrl               = "http://example.contoso.local"
                Enabled                 = $true
                ShowStartASiteMenuItem  = $true
                CustomFormUrl           = "http://ssc.contoso.com.local/ssc"
                PsDscRunAsCredential    = $SetupAccount
            }
        }
    }

Example 3

This example shows how to disable self-service site creation for a web application

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

        node localhost {
            SPSelfServiceSiteCreation SSC
            {
                WebAppUrl               = "http://example.contoso.local"
                Enabled                 = $false
                PsDscRunAsCredential    = $SetupAccount
            }
        }
    }
Clone this wiki locally