-
Notifications
You must be signed in to change notification settings - Fork 107
SPSiteUrl
dscbot edited this page Mar 17, 2023
·
9 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Url | Key | String | The URL of the site collection | |
Intranet | Write | String | The URL of the Intranet zone | |
Internet | Write | String | The URL of the Internet zone | |
Extranet | Write | String | The URL of the Extranet zone | |
Custom | Write | String | The URL of the Custom zone |
Type: Distributed Requires CredSSP: No
This resource will configure the site url for a host named site collection. There are four available zones to configure: Intranet, Internet, Extranet and Custom.
It is not possible to change the site url for the Default zone, since this means changing the url that is used as identity. A site collection rename is required for that: $site = Get-SPSite "http://old.contoso.com" $new = "http://new.contoso.com" $site.Rename($new) ((Get-SPSite $new).contentdatabase).RefreshSitesInConfigurationDatabase
This example configures the site collection urls for the specified Host Named Site Collection
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPSiteUrl TeamSite
{
Url = "http://sharepoint.contoso.intra"
Intranet = "http://sharepoint.contoso.com"
Internet = "https://sharepoint.contoso.com"
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