-
Notifications
You must be signed in to change notification settings - Fork 107
SPWebAppSiteUseAndDeletion
Brian Farnhill edited this page Dec 9, 2016
·
18 revisions
Parameters
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Url | 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 | |
InstallAccount | Write | string | POWERSHELL 4 ONLY: The account to run this resource as, use PsDscRunAsCredential if using PowerShell 5 |
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
Examples
Example 1
This example shows how to apply site use and deletion settings to the specified web applicaiton
Configuration Example
{
param(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost {
SPWebAppSiteUseAndDeletion ConfigureSiteUseAndDeletion
{
Url = "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