Sunday, June 1, 2014

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

From - > http://terenceluk.blogspot.in/2013/03/exporting-lync-server-2010-archive.html


Another solution can be - Putting only Netbios name for the server - DBInstance switch

From - > http://social.technet.microsoft.com/Forums/lync/en-US/266a3ca1-b00a-4b8c-9548-e67ed0d4377f/archiving-database-issue

Problem
You attempt to export the IM logs from a Lync Server 2010 archive database with the cmdlet:
Export-CsArchivingData -Identity "ArchivingDatabase:svrsql200801.contoso.internal\lyncarc" -StartDate 1/1/2010 -OutputFolder "C:\ArchivingExports"
… but receive the following error:
PS C:\Users\tluk> Export-CsArchivingData -Identity "ArchivingDatabase:svrsql200801.contoso.internal\lyncarc" -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.internal\lyncarc" -StartDate 1/1/2010 -OutputFolder "C:\ArchivingExports"
    + CategoryInfo          : InvalidArgument: (:) [Export-CsArchivingData], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,ExportArchiveData.ExportArchiveDataCmdlet
PS C:\Users\tluk>
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:
image
… and the following is for Lync Server 2013:
image
The proper syntax for Lync Server 2010 is actually:
Export-CsArchivingData -DBInstance "svrsql200801.contoso.internal\lyncarc" -StartDate 1/1/2010 -OutputFolder "C:\ArchivingExports"
image
PS C:\Users\tluk> Export-CsArchivingData -DBInstance "svrsql200801.contoso.internal\lyncarc" -StartDate 1/1/2010 -OutputFolder "C:\ArchivingExports"
Total number of sessions: 10033  Successfully exported sessions: 10033 Failed sessions: 0
PS C:\Users\tluk>
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.

No comments:

Post a Comment