-
Notifications
You must be signed in to change notification settings - Fork 107
SPSelfServiceSiteCreation
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 |
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.
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.
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
}
}
}
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
}
}
}
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
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations