I’ve been asked quite a few times in the past about how an administrator can export archived IM messages from a Lync Server archiving database and while I faintly have an idea of the PowerShell cmdlet used, I find that I can never remember exactly what it is and the syntax because I don’t use it enough so this post serves to demonstrate using the cmdlet.
The cmdlet we’re interested in using is Export-CsArchivingData and the documentation for it can be found here:
http://technet.microsoft.com/en-us/library/gg398452.aspx
The syntax is fairly straight forward as demonstrated in the documentation:
COMMON PARAMETERS: -OutputFolder <String> -StartDate <DateTime> [-Confirm [<SwitchParameter>]] [-EndDate <DateTime>] [-ExcludeWebConfArchive <SwitchParameter>] [-Force <SwitchParameter>] [-IncludeTrustedApplication <SwitchParameter>] [-Purge <SwitchParameter>] [-UserUri <String>] [-WhatIf [<SwitchParameter>]]
The following example demonstrates exporting messages for a specific user with the start date of February 5, 2013:
Export-CsArchivingData -Identity "ArchivingDatabase:svrsqlmon01.domain.internal" -StartDate 2/5/2013 -OutputFolder "C:\ArchivingExports" -UserUri "sip:tluk@domain.com"
The default file format of the messages that the cmdlet exports is .eml but you can actually rename it to .mht and use Internet Explorer to open the file:
The following cmdlet exports all of the archived IMs with the start date of February 5, 2013:
Export-CsArchivingData -Identity "ArchivingDatabase:svrsqlmon01.domain.internal" -StartDate 2/5/2013 -OutputFolder "C:\ArchivingExports"
The following cmdlet exports all of the archived IMs with a start date of February 5, 2013 and end date of February 10, 2013:
Export-CsArchivingData -Identity "ArchivingDatabase:svrsqlmon01.domain.internal" -StartDate 2/5/2013 -EndDate 2/10/2013 -OutputFolder "C:\ArchivingExports"
1 comment:
Hi!
It seems that not all the conferences are exported in my environment (Lync 2010 with October 2013 CU).
This is the command I run
Export-CSArchivingData -DBInstance sql01.###### -StartDate 01/01/2012 -EndDate 20/12/201 -OutputFolder "C:\Backup\ArchivingExports"
Total number of sessions: 6 Successfully exported sessions: 6 Failed sessions: 0
But if I look into the DB (lcsLOG) and on the Archiving share (\\store\LyncArchive) I see that there should be many more sessions...
It seems that in the export it lacks the last 2 months (from october to december)
What could be the issue?
Thanks
Post a Comment