-
Notifications
You must be signed in to change notification settings - Fork 107
SPUsageDefinition
dscbot edited this page Mar 17, 2023
·
4 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | String | Name of the Usage Definition to configure | |
DaysRetained | Write | UInt32 | The number of days that usage is retained | |
DaysToKeepUsageFiles | Write | UInt32 | The number of days to keep usage file retention | |
MaxTotalSizeInBytes | Write | UInt64 | Sets the maximum retention size in bytes | |
Enabled | Write | Boolean | True enables the Usage Definition | |
UsageDatabaseEnabled | Write | Boolean | True enables logging to the Usage database(SP2016 and above only) | |
Ensure | Write | String | Present to configure the diagnostics provider |
Present , Absent
|
Type: Distributed Requires CredSSP: No
This resource is responsible for configuring the Usage Definitions within the local SharePoint farm. Using Ensure=Absent is not supported. This resource can only apply configuration, not ensure they don't exist.
To get an overview of all available Diagnostics Providers, use the cmdlet Get-SPUsageDefinition.
This example shows how to configure the Administrative Actions Usage Definition.
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPUsageDefinition 'AdministrativeActions'
{
Name = "Administrative Actions"
DaysRetained = 14
DaysToKeepUsageFiles = 1
MaxTotalSizeInBytes = 10000000000000
Enabled = $true
UsageDatabaseEnabled = $true
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