Export (0) Print
Expand All

Set-SPDiagnosticConfig

 

Applies to: SharePoint Server 2013 Enterprise, SharePoint Foundation 2013

Topic Last Modified: 2013-12-18

Sets diagnostic configuration settings on the farm.

Set-SPDiagnosticConfig [-AllowLegacyTraceProviders <SwitchParameter>] [-AppAnalyticsAutomaticUploadEnabled <SwitchParameter>] [-AssignmentCollection <SPAssignmentCollection>] [-CustomerExperienceImprovementProgramEnabled <SwitchParameter>] [-DaysToKeepLogs <Int32>] [-DownloadErrorReportingUpdatesEnabled <SwitchParameter>] [-ErrorReportingAutomaticUploadEnabled <SwitchParameter>] [-ErrorReportingEnabled <SwitchParameter>] [-EventLogFloodProtectionEnabled <SwitchParameter>] [-EventLogFloodProtectionNotifyInterval <Int32>] [-EventLogFloodProtectionQuietPeriod <Int32>] [-EventLogFloodProtectionThreshold <Int32>] [-EventLogFloodProtectionTriggerPeriod <Int32>] [-InputObject <PSObject>] [-LogCutInterval <Int32>] [-LogDiskSpaceUsageGB <Int32>] [-LogLocation <String>] [-LogMaxDiskSpaceUsageEnabled <SwitchParameter>] [-ScriptErrorReportingDelay <Int32>] [-ScriptErrorReportingEnabled <SwitchParameter>] [-ScriptErrorReportingRequireAuth <SwitchParameter>]

Use the Set-SPDiagnosticConfig cmdlet to set diagnostic configuration settings on the entire farm.

 

Parameter Required Type Description

AllowLegacyTraceProviders

Optional

System.Management.Automation.SwitchParameter

Specifies that trace providers built for previous versions of SharePoint Products and Technologies can write to the trace session for SharePoint 2010 Products.

AppAnalyticsAutomaticUploadEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether aggregated app usage data is automatically uploaded to Microsoft.

AssignmentCollection

Optional

Microsoft.SharePoint.PowerShell.SPAssignmentCollection

Manages objects for the purpose of proper disposal. Use of objects, such as SPWeb or SPSite, can use large amounts of memory and use of these objects in Windows PowerShell scripts requires proper memory management. Using the SPAssignment object, you can assign objects to a variable and dispose of the objects after they are needed to free up memory. When SPWeb, SPSite, or SPSiteAdministration objects are used, the objects are automatically disposed of if an assignment collection or the Global parameter is not used.

NoteNote:
When the Global parameter is used, all objects are contained in the global store. If objects are not immediately used, or disposed of by using the Stop-SPAssignment command, an out-of-memory scenario can occur.

CustomerExperienceImprovementProgramEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether participation in the Customer Experience Improvement Program (CEIP) is enabled.

The CEIP is designed to improve the quality, reliability, and performance of Microsoft products and technologies. With your permission, anonymous information about your server is sent to Microsoft to help improve SharePoint 2010 Products.

The type must be either of the following values:

- $True

- $False

The default value is $True.

DaysToKeepLogs

Optional

System.Int32

Specifies the number of days to keep trace log files. The type must be a valid number between 1 and 366. The default value is 14 days..

DownloadErrorReportingUpdatesEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether the error reporting remote control file is downloaded.

The type must be either of the following values:

- $True

- $False

The default value is $True.

ErrorReportingAutomaticUploadEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether error reports are uploaded to Microsoft automatically.

Error reports include the following: information regarding the condition of the server when a problem occurs; the operating system version and computer hardware in use; and the digital product ID, which can be used to identify your license. The IP address of your computer is also sent because you are connecting to an online service to send error reports; however, the IP address is used only to generate aggregate statistics.

The type must be either of the following values:

- $True

- $False

The default value is $True.

ErrorReportingEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether collection of error reports is enabled.

Error reports are created when your system encounters hardware or software problems. Microsoft and its partners actively use these reports to improve the reliability of the software. Error reports include the following: information regarding the condition of the server when the problem occurs; the operating system version and computer hardware in use; and the digital product ID, which can be used to identify your license. The IP address of your computer is also sent because you are connecting to an online service to send error reports; however, the IP address is used only to generate aggregate statistics.

The type must be either of the following values:

- $True

- $False

The default value is $True.

EventLogFloodProtectionEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether the Event log flood protection feature is enabled.

If multiple similar events are written to the event log, some duplicate messages are suppressed. Then, after a period of time, a summary message is written that shows how many events were suppressed.

The type must be either of the following values:

- $True

- $False

The default value is $True.

EventLogFloodProtectionNotifyInterval

Optional

System.Int32

Specifies in minutes how often to write a summary event indicating how many events were suppressed due to flood protection.

The integer range is between 1 and 1440. The default value is 5.

EventLogFloodProtectionQuietPeriod

Optional

System.Int32

Specifies in minutes how much time must pass without an event firing to exit flood protection.

The integer range is between 1 and 1440. The default value is 2.

EventLogFloodProtectionThreshold

Optional

System.Int32

Specifies the number of events allowed in a given timeframe before an event is considered to be flooding the event log.

The integer range is between 1 and 100. The default value is 5.

EventLogFloodProtectionTriggerPeriod

Optional

System.Int32

Specifies in minutes the timeframe to watch for events that may be flooding.

The integer range is between 1 and 1440. The default value is 2.

InputObject

Optional

System.Management.Automation.PSObject

Use the result from the Get-SPDiagnosticConfig cmdlet, make modifications, and then pipeline the object into Set-SPDiagnosticConfig cmdlet to update the content database.

LogCutInterval

Optional

System.Int32

Specifies a time period to roll over to the next log file.

The type must be a valid number between 0 and 1440.

The default value is 30.

LogDiskSpaceUsageGB

Optional

System.Int32

Specifies the maximum amount of storage to use for trace log files, in gigabytes (GB).

The default value is 1000 and only takes effect when the LogMaxDiskSpaceusageEnabled cmdlet is set to True.

The type must be a valid number between 1 and 1000.

LogLocation

Optional

System.String

Specifies the path of where to log files will reside.

The type must be a valid path, in the form C:\Logs.

The default location is %CommonProgramFiles%\Microsoft Shared\Web Server Extensions\14\Logs.

LogMaxDiskSpaceUsageEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether to restrict the maximum space to use for trace log files.

The type must be either of the following values:

- $True

- $False

The default value is $False.

ScriptErrorReportingDelay

Optional

System.Int32

Specifies the time (in minutes) between script error reports.

The type must be a valid integer between 0 and 1440. The value is specified in minutes.

The default value is 30.

ScriptErrorReportingEnabled

Optional

System.Management.Automation.SwitchParameter

Specifies whether error reporting is enabled for client script errors.

The type must be either of the following values:

- $True

- $False

The default value is $True.

ScriptErrorReportingRequireAuth

Optional

System.Management.Automation.SwitchParameter

Specifies whether script error reporting requires authentication.

The type must be either of the following values:

- $True

- $False

The default value is $True.

------------------EXAMPLE 1-----------------------

set-spdiagnosticconfig -errorReportingEnable -DownloadErrorReportingUpdatesEnabled:$false -DaysToKeepLog  60

This example enables ErrorReporting, disables DownloadErrorReportingUpdatesEnable, and sets DaysToKeepLog to 60.

------------------EXAMPLE 2-----------------------

$L = get-spdiagnosticconfig
$L.CustomerExperienceImprovementProgramEnabled = $false
$L.LogCutInterval = 60
$L | Set-SPDiagnosticConfig

This example disables CEIP and sets LogCutInterval to 60 minutes.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft