-
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 | |
ParentSiteUrl | Write | String | 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) | |
ManagedPath | Write | String | Specifies the managed path in which site collections have to be created (SP2019 only) | |
AlternateUrl | Write | String | Specifies the URL of the web application in which site collections have to be created (SP2019 only) | |
UserExperienceVersion | Write | String | Specifies the if the site collection has to be created as modern or classic site (SP2019 only) |
Modern , Classic , Latest
|
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
}
}
}
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
ManagedPath = "sites"
UserExperienceVersion = "Modern"
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