Skip to content

SPWebApplicationAppDomain

dscbot edited this page Mar 17, 2023 · 19 revisions

SPWebApplicationAppDomain

Parameters

Parameter Attribute DataType Description Allowed Values
WebAppUrl Key String The URL of the web application to set the app domain for
Zone Key String The zone that this app domain applies to Default, Internet, Intranet, Extranet, Custom
AppDomain Required String The domain for apps in this web app zone
Port Write String The port to run apps on
SSL Write Boolean Should apps run under SSL

Description

Type: Distributed Requires CredSSP: No

This resource will configure the App Domain at a specific zone for the given Web Application. The configuration is done per zone on the specified web application, allowing for the setting of unique app domains for each extension of a web application. The app prefix should still be set using the SPAppDomain resource before this is applied to customise a specific zone.

Examples

Example 1

This example shows how to set the app domain for a specified web application

Configuration Example
{
    param
    (
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPWebApplicationAppDomain Domain
        {
            AppDomain            = "contosointranetapps.com"
            WebAppUrl            = "http://portal.contoso.com"
            Zone                 = "Default"
            Port                 = 80
            SSL                  = $false
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally