-
Notifications
You must be signed in to change notification settings - Fork 107
SPAlternateUrl
Brian Farnhill edited this page Jul 3, 2017
·
19 revisions
Parameters
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
WebAppUrl | Key | String | The URL of the web application to apply the alternate URL to | |
Zone | Key | String | The Zone to use for the alternate URL | Default, Intranet, Extranet, Custom, Internet |
Url | Write | String | The new alternate URL | |
Ensure | Write | string | Present ensures the URL is set for this zone on this web app, Absent ensures it is removed | Present, Absent |
InstallAccount | Write | String | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 |
This resource is used to define an alternate access mapping URL for a specified web application. These can be assigned to specific zones for each web application. Alternatively a URL can be removed from a zone to ensure that it will remain empty and have no alternate URL.
The default value for the Ensure parameter is Present. When not specifying this parameter, the setting is configured.
Examples
Example 1
This example shows how to add a new alternate URL to a specific web application
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPAlternateUrl CentralAdminAAM
{
WebAppUrl = "http://sharepoint1:9999"
Zone = "Intranet"
Url = "https://admin.sharepoint.contoso.com"
PsDscRunAsCredential = $SetupAccount
}
}
}
Example 2
This example shows how to remove an alternate URL from a specified zone for a specific web application.
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPAlternateUrl CentralAdminAAM
{
WebAppUrl = "http://sharepoint1:9999"
Zone = "Intranet"
Ensure = "Absent"
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