Remove content from Lync server 2013 persistent chat room

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:

lync2

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:

lync1

 

Thanks for reading! You can follow me on Twitter @PrigentNico or LinkedIn

About Nicolas 282 Articles
I work as an IT Production Manager, based in Paris (France) with a primary focus on Microsoft technologies. I have 10 years experience in administering Windows Servers. . I am a Microsoft MVP for Cloud & Datacenter Management. I also received the PowerShell Hero 2016 award by PowerShell.0rg. And finally, I am "MCSE: Cloud Platform and Infrastructure", "MCSA: Windows Servers", "Administering & Deploying SCCM", and CheckPoint CCSA certified.