-
Notifications
You must be signed in to change notification settings - Fork 107
SPDiagnosticsProvider
dscbot edited this page Mar 17, 2023
·
11 revisions
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Name | Key | String | Name of the Diagnostics Provider to configure | |
Retention | Write | UInt16 | Sets the retention period in days | |
MaxTotalSizeInBytes | Write | UInt64 | Sets the maximum retention size in bytes | |
Enabled | Write | Boolean | True enables the Diagnostics Provider | |
Ensure | Write | String | Present to configure the diagnostics provider |
Present , Absent
|
Type: Distributed Requires CredSSP: No
This resource is responsible for configuring the Diagnostics Provider within the local SharePoint farm. Using Ensure equals to 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-SPDiagnosticsProvider.
This example shows how to configure the retention period for a Diagnostics Provider.
Configuration Example
{
param
(
[Parameter(Mandatory = $true)]
[PSCredential]
$SetupAccount
)
Import-DscResource -ModuleName SharePointDsc
node localhost
{
SPDiagnosticsProvider BlockingQueryProvider
{
Ensure = "Present"
Name = "job-diagnostics-blocking-query-provider"
MaxTotalSizeInBytes = 10000000000000
Retention = 14
Enabled = $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