Topic Last Modified: 2013-02-21

Deletes all the Device Update Web service log and audit files that are older than the specified number of days. This cmdlet was introduced in Lync Server 2010.


Clear-CsDeviceUpdateLog -DaysBack <Int32> -Identity <XdsIdentity> [-Confirm [<SwitchParameter>]] [-Force <SwitchParameter>] [-WhatIf [<SwitchParameter>]]



The command shown in Example 1 connects to the Device Update Web service with the Identity "" and deletes all the device and audit logs that are more than 10 days old.

Copy Code
Clear-CsDeviceUpdateLog -Identity "" -DaysBack 10

Detailed Description

The Device Update Web service keeps an extensive collection of log files; this collection includes both audit logs conducted by the service itself as well as log files uploaded from client devices such as cell phones. Depending on the amount of device update activity, and depending on the number of client devices used in your organization, your server could soon become “cluttered” with Device Update Web service logs. The Clear-CsDeviceUpdateLog cmdlet provides a way for you to reduce the number of log files stored on the server: all you have to do is run the cmdlet and specify the maximum age (in days) of the files that should not be deleted. Any log files older than that maximum age will be removed from the system.

Who can run this cmdlet: By default, members of the following groups are authorized to run the Clear-CsDeviceUpdateLog cmdlet locally: RTCUniversalServerAdmins. To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Clear-CsDeviceUpdateLog"}


Parameter Required Type Description




Maximum age (in days) of the log files to be maintained. All log files older than the value specified using the DaysBack parameter will be deleted. For example, if you set DaysBack to 7 then any log files more than seven days old will be removed.

This parameter can be set to any integer value between 1 and 30, inclusive.




Unique identifier of the service hosting the Device Update Web service log files. For example, this syntax clears Device Update Web service log files from the Web Services for the pool -Identity "".




Prompts you for confirmation before executing the command.




Suppresses the display of any non-fatal error message that might occur when running the command.




Describes what would happen if you executed the command without actually executing the command.

Input Types

None. The Clear-CsDeviceUpdateLog cmdlet does not accept pipelined input.

Return Types

None. The Clear-CsDeviceUpdateLog cmdlet does not return any values.

See Also