Skip to content

SPWebAppGeneralSettings

dscbot edited this page Mar 17, 2023 · 18 revisions

SPWebAppGeneralSettings

Parameters

Parameter Attribute DataType Description Allowed Values
WebAppUrl Key String The URL of the web app to set the general settings for
TimeZone Write UInt32 The timezone code to use for this web app. A full list is at https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spregionalsettings.timezones.aspx
Alerts Write Boolean Should alerts be enabled for this web app
AlertsLimit Write UInt32 What is the maximum number of alerts that a user can create in this web app
RSS Write Boolean Should RSS feeds be enabled in this web app
BlogAPI Write Boolean Should the Blog API be enabled in this web app
BlogAPIAuthenticated Write Boolean Is authentication required for the blog API
BrowserFileHandling Write String What file handling mode should be used in this web app - strict or permissive Strict, Permissive
SecurityValidation Write Boolean Is security validation enforced in this web app
SecurityValidationExpires Write Boolean Does security validation expire after a set time
SecurityValidationTimeOutMinutes Write UInt32 Number of minutes security validation will expire if securityvalidationexpires is set
RecycleBinEnabled Write Boolean Is the recycle bin enabled in this web application
RecycleBinCleanupEnabled Write Boolean Is automatic cleanup of the recycle bin enabled in this web app
RecycleBinRetentionPeriod Write UInt32 How many days does the recycle bin keep content for
SecondStageRecycleBinQuota Write UInt32 How much content does the second stage recycle bin keep content for
MaximumUploadSize Write UInt32 What is the maximum file upload size for this web app (in MB)
CustomerExperienceProgram Write Boolean Should the customer experience program be enabled in this web app
AllowOnlineWebPartCatalog Write Boolean Should the Online WebPart Gallery be enabled for this web app
SelfServiceSiteCreationEnabled Write Boolean Should Self Service Site Creation be enabled
PresenceEnabled Write Boolean Is Skype for Business presence enabled for this web app
DefaultQuotaTemplate Write String What is the default quota template for this web app

Description

Type: Distributed Requires CredSSP: No

This resource is responsible for setting web application settings that are found under the "general settings" screen in central admin. The web application is specified through the URL property, and then any combination of settings can be applied. Any settings not included will be left as the default (or whatever they have been manually changed to within SharePoint).

Examples

Example 1

This example shows how to apply some of the available general settings to the specified web app

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

    Import-DscResource -ModuleName SharePointDsc

    node localhost
    {
        SPWebAppGeneralSettings PrimaryWebAppGeneralSettings
        {
            WebAppUrl            = "http://example.contoso.local"
            TimeZone             = 76
            Alerts               = $true
            RSS                  = $false
            PsDscRunAsCredential = $SetupAccount
        }
    }
}
Clone this wiki locally