Skip to content

SPAppStoreSettings

dscbot edited this page Mar 17, 2023 · 17 revisions

SPAppStoreSettings

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

Description

Type: Distributed Requires CredSSP: No

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