Skip to content

SPAppStoreSettings

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

Parameters

Parameter Attribute DataType Description Allowed Values
WebAppUrl Key string The URL of the web application
AllowAppPurchases Write Boolean Specifies if App Purchases from the SharePoint Store are allowed
AllowAppsForOffice Write Boolean Specifies if App Purchases for Office applications are allowed
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 ability to purchase apps for both SharePoint and Office apps.

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 {
        SPAppStoreSettings EnableSharePointAppStore
        {
            WebAppUrl            = "https://sharepoint.contoso.com"
            AllowAppPurchases    = $true
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 2

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 {
        SPAppStoreSettings EnableAppStores
        {
            WebAppUrl            = "https://sharepoint.contoso.com"
            AllowAppPurchases    = $true
            AllowAppsForOffice   = $true
            PsDscRunAsCredential = $SetupAccount
        }
    }
}

Example 3

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 {
        SPAppStoreSettings DisableAppStores
        {
            WebAppUrl            = "https://sharepoint.contoso.com"
            AllowAppPurchases    = $false
            AllowAppsForOffice   = $false
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally