-
Notifications
You must be signed in to change notification settings - Fork 107
SPWebAppSiteUseAndDeletion
dscbot edited this page Mar 17, 2023
·
18 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
WebAppUrl | Key | String | The URL of the web application | |
SendUnusedSiteCollectionNotifications | Write | Boolean | Should emails be sent to notify site owners of unused site collections | |
UnusedSiteNotificationPeriod | Write | UInt32 | How many days should pass before a site is flagged as unused | |
AutomaticallyDeleteUnusedSiteCollections | Write | Boolean | Should unused site collection be automatically deleted | |
UnusedSiteNotificationsBeforeDeletion | Write | UInt32 | How many days before an unused site is deleted should an email be sent to the owner |
Type: Distributed Requires CredSSP: No
This resource is responsible for controlling the Site Use and Deletion settings on a specific web application. You can enable or disable the Site Use and Deletion feature, specify the amount of days after which the alerts are being send, if sites have to be deleted automatically and if so after how many
This example shows how to apply site use and deletion settings to the specified web application
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPWebAppSiteUseAndDeletion ConfigureSiteUseAndDeletion
{
WebAppUrl = "http://example.contoso.local"
SendUnusedSiteCollectionNotifications = $true
UnusedSiteNotificationPeriod = 90
AutomaticallyDeleteUnusedSiteCollections = $true
UnusedSiteNotificationsBeforeDeletion = 24
PsDscRunAsCredential = $SetupAccount
}
}
}
- Home
- Getting Started
- Pre-requisites
- Installing the module
- Exporting SharePoint Configuration
- Creating Configuration Files
- Pre-created Examples
- Creating an Azure development environment
- Understanding Resources & Syntax
- Remote PowerShell Authentication
- Contributing to SharePointDsc
- Other useful modules for SharePoint DSC configurations