在 Lync Server 2013 中刪除裝置更新記錄檔Delete Device Update log files in Lync Server 2013

 

主題上次修改日期: 2013-02-23Topic Last Modified: 2013-02-23

裝置更新 Web 服務會保留大量的記錄檔集合。The Device Update Web service keeps an extensive collection of log files. 此集合包含服務本身所執行的審計記錄,以及從用戶端裝置上傳的記錄檔。This collection includes both audit logs conducted by the service itself and log files uploaded from client devices. 若要防止伺服器填滿裝置更新 Web 服務記錄,您可能會想要清除已有特定天數的記錄檔。To prevent the server from filling up with Device Update Web service logs, you’ll probably want to clear it of log files that have been around for a certain number of days. 根據您組織中的更新活動和用戶端裝置數目,以及使用 Lync Server 控制台或 Lync Server 管理命令介面,來設定此天數。Set this number of days based on update activity and the number of client devices in your organization, and by using Lync Server Control Panel or Lync Server Management Shell.

使用 Lync Server 控制台清除裝置更新記錄檔To clear the device update log by using Lync Server Control Panel

  1. 開啟瀏覽器視窗,然後輸入管理 URL 以開啟 Lync Server 控制台。Open a browser window, and then enter the Admin URL to open the Lync Server Control Panel. 如需您可以用來啟動 Lync Server 控制台之不同方法的詳細資訊,請參閱 Open Lync server 2013 系統管理工具For details about the different methods you can use to start Lync Server Control Panel, see Open Lync Server 2013 administrative tools.

  2. 在左導覽列中,按一下 [ 用戶端],然後按一下 [ 裝置記錄檔設定]。In the left navigation bar, click Clients, and then click Device Log Configuration.

  3. 在 [ 裝置記錄 檔設定] 頁面上,按兩下您要變更的設定。On the Device Log Configuration page, double-click the configuration that you want to change.

  4. 在 [ 編輯記錄檔設定 ] 對話方塊中,將 **記錄檔的保留天數 (1-365) **中,指定天數。In the Edit Log Setting dialog box, in Number of days to keep log files (1-365), specifiy a number of days.

  5. 按一下 [認可]Click Commit. 伺服器上已超過指定天數的所有檔案都會被刪除。All files that have been on the server for more than the specified number of day are deleted. 此設定會套用至此設定,直到您變更。This setting will apply to this configuration until you change it.

使用 Windows PowerShell Cmdlet 清除裝置更新記錄檔Clearing the Device Update Log by Using the Windows PowerShell Cmdlets

您可以使用 Windows PowerShell 和 CsDeviceUpdateLog Cmdlet 來清除裝置更新記錄。You can clear device update logs by using Windows PowerShell and the Clear-CsDeviceUpdateLog cmdlet. 您可以從 Lync Server 2013 管理命令介面或從 Windows PowerShell 的遠端會話中執行此 Cmdlet。This cmdlet can be run either from the Lync Server 2013 Management Shell or from a remote session of Windows PowerShell.

注意

如需使用遠端 Windows PowerShell 連接至 Lync Server 的詳細資訊,請參閱 Lync Server Windows PowerShell 博客文章「快速入門:使用遠端 PowerShell 管理 Microsoft Lync Server 2010」 at https://go.microsoft.com/fwlink/p/?linkId=255876For details about using remote Windows PowerShell to connect to Lync Server, see the Lync Server Windows PowerShell blog article "Quick Start: Managing Microsoft Lync Server 2010 Using Remote PowerShell" at https://go.microsoft.com/fwlink/p/?linkId=255876.

在一部伺服器上清除裝置更新記錄檔To clear device update logs on one server

  • 下列命令會清除網頁伺服器 atl-cs-001.litwareinc.com 上的裝置更新記錄檔。The following command clears the device update log on the Web server atl-cs-001.litwareinc.com. 所有記錄專案超過10天的 (會從記錄中移除 DaysBack 參數) 所指定的值。All log entries more than 10 days old (the value specified by the DaysBack parameter) will be removed from the log.

    Clear-CsDeviceUpdateLog -Identity "service:WebServer:atl-cs-001.litwareinc.com" -DaysBack 10
    

清除所有裝置更新記錄檔To clear all device update logs

  • 此命令會移除過期的專案 (在此範例中,會從目前在組織中使用的所有裝置更新記錄檔中,輸入超過10天的舊) 。This command removes outdated entries (in this example, entries more than 10 days old) from all the device update logs currently in use in your organization.

    Get-CsService -WebServer | Foreach-Object {Clear-CsDeviceUpdateLog -Identity $_.Identity -DaysBack 10}
    

如需詳細資訊,請參閱 Help 主題 for the CsDeviceUpdateLog Cmdlet。For details, see the Help topic for the Clear-CsDeviceUpdateLog cmdlet.