Remove content from Lync server 2013 persistent chat room
With PowerShell, you can remove content from a room easily. Just use the “Clear-CsPersistentChatRoom” cmdlet. This cmdlet was introduced in Lync Server 2013. If you want to remove all the content from a persistent chat, run the Lync Server Management Shell:
You can get the name of the persistent chat with the following cmdlet:
Get-CsPersistentChatroom
Now, remove the content:
Get-CsPersistentChatroom -Identity LYNCServer.demo.local\XXXXX | Clear-CsPersistentChatRoom
Note: Closing the chat window will refresh the conversation history.
You can remove content from all persistent chat rooms:
Get-CsPersistentChatRoom | Clear-CsPersistentChatRoom
and now remove all content older than one day from all persistent chat rooms:
Get-CsPersistentChatRoom | Clear-CsPersistentChatRoom –End Date ([DateTime]::today.AddDays(-1)) -Confirm:$false
Remember to configure chat history in the Lync control panel:
Thanks for reading! You can follow me on Twitter @PrigentNico or LinkedIn