Exporting Lync Server 2010 Archive Database IM logs throws the error: “Export-CsArchivingData : A parameter cannot be found that matches parameter name 'Identity'.”

Problem

You attempt to export the IM logs from a Lync Server 2010 archive database with the cmdlet:

Export-CsArchivingData -Identity “ArchivingDatabase:svrsql200801.contoso.internallyncarc” -StartDate 1/1/2010 -OutputFolder “C:ArchivingExports”

… but receive the following error:

PS C:Userstluk> Export-CsArchivingData -Identity “ArchivingDatabase:svrsql200801.contoso.internallyncarc” -StartDate 1/1/2010 -OutputFolder “C:ArchivingExports”
Export-CsArchivingData : A parameter cannot be found that matches parameter name ‘Identity’.
At line:1 char:33
+ Export-CsArchivingData -Identity <<<<  “ArchivingDatabase:svrsql200801.contoso.internallyncarc” -StartDate 1/1/2010 -OutputFolder “C:ArchivingExports”
    + CategoryInfo          : InvalidArgument: (:) [Export-CsArchivingData], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,ExportArchiveData.ExportArchiveDataCmdlet

PS C:Userstluk>

image

Solution

I was actually thrown off when I was asked to look into this because I don’t perform a lot of archiving database exports in a year but what ended up being the problem was that the administrator I was working with was using the Lync Server 2013 cmdlet switches to export a Lync Server 2010 archiving database and as some may know, the cmdlet is the same between the two versions but the switches have changed.  The following is the cmdlet and switches for Lync Server 2010:

http://technet.microsoft.com/en-us/library/gg398452(v=ocs.14).aspx

image

… and the following is for Lync Server 2013:

http://technet.microsoft.com/en-us/library/gg398452.aspx

image

The proper syntax for Lync Server 2010 is actually:

Export-CsArchivingData -DBInstance “svrsql200801.contoso.internallyncarc” -StartDate 1/1/2010 -OutputFolder “C:ArchivingExports”

image

PS C:Userstluk> Export-CsArchivingData -DBInstance “svrsql200801.contoso.internallyncarc” -StartDate 1/1/2010 -OutputFolder “C:ArchivingExports”
Total number of sessions: 10033  Successfully exported sessions: 10033 Failed sessions: 0
PS C:Userstluk>

This issue might seem a bit obvious but just in case someone comes across this error message and decides to Google it, this post should serve up a quick answer.

One Response