Export (0) Print
Expand All
Expand Minimize

Set-SPUsageService

Published: May 12, 2010

Sets the properties of a usage service.

Set-SPUsageService [[-Identity] <SPUsageServicePipeBind>] [-AssignmentCollection <SPAssignmentCollection>] [-Confirm [<SwitchParameter>]] [-LoggingEnabled <Nullable>] [-UsageLogCutTime <UInt32>] [-UsageLogLocation <String>] [-UsageLogMaxSpaceGB <UInt32>] [-WhatIf [<SwitchParameter>]]

Parameters

 

Parameter Required Type Description

Identity

Optional

Microsoft.SharePoint.PowerShell.SPUsageServicePipeBind

Specifies the usage service to update.

The type must be a valid GUID, in the form 12345678-90ab-cdef-1234-567890bcdefgh; a valid name of a usage service (for example, UsageService1); or an instance of a valid SPUsageService object.

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.

note Note:

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.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command. For more information, type the following command: get-help about_commonparameters

LoggingEnabled

Optional

System.Nullable

Specifies that usage data is logged to usage files.

UsageLogCutTime

Optional

System.UInt32

Specifies the time, in minutes, of usage data collected per usage log file. The default time is 5 minutes.

The type must be an integer in the range of 1 to 1440.

UsageLogLocation

Optional

System.String

Specifies the path on every computer in the farm where usage log files are created.

The type must be a valid path in either of the following forms:

- C:\folder_name

- \\server_name\folder_name

UsageLogMaxSpaceGB

Optional

System.UInt32

Specifies the amount in megabytes (MB) of space that can be used by usage log files. The valid range is 500 to 20,000 MB.

The default value is 5,000.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Displays a message that describes the effect of the command instead of executing the command. For more information, type the following command: get-help about_commonparameters

Detailed Description

The Set-SPUsageService cmdlet updates the properties of a usage service. If the Identity parameter is not specified, the cmdlet applies the changes to the local usage service.

Input Types

 

Return Types

 

--------------------EXAMPLE-----------------

Set-SPUsageService -LoggingEnabled $false
Set-SPUsageService -UsageLogLocation "d:\\testusagelogdir
Set-SPUsageService -UsageLogCutTime 5

The examples disable usage logging, change the directory where usage files are stored, and creates a new usage log file every 5 minutes.

Change History

 

Date Description Reason

May 12, 2010

Initial publication

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