Skip to content

SPWebApplicationAppDomain

Brian Farnhill edited this page Dec 9, 2016 · 19 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
WebApplication 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
InstallAccount Write String POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

Description

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"
            WebApplication ="http://portal.contoso.com";
            Zone = "Default";
            Port = 80;
            SSL = $false;
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally