Skip to content

SPAppCatalog

Brian Farnhill edited this page Jul 3, 2017 · 19 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
SiteUrl Key string The URL of the site collection that will be the app catalog for the web app that it is in
InstallAccount Write String POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5

Description

This resource will ensure that a specific site collection is marked as the app catalog for the web application that the site is in. The catalog site needs to have been created using the correct template (APPCATALOG#0).

This resource should be run using the farm account, and not another specific setup account. Running this with the setup account you have used in your configuration may relate to access denied errors.

Examples

Example 1

This example shows how to configure the AppCatalog in the farm

Configuration Example 
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $SetupAccount
    )
    Import-DscResource -ModuleName SharePointDsc

    node localhost {
        SPAppCatalog MainAppCatalog
        {
            SiteUrl              = "https://content.sharepoint.contoso.com/sites/AppCatalog"
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally