mercredi 3 décembre 2014

Calculating Content Organizer Destination



I want to find a way to calculate (using powershell) the final destination of an item in a document library. This little snippet is what I'm trying to do but it keeps saying that it doesn't contain such a method:


$List = $Web.Lists[$listname]

$item = $List.GetItemById($ID) $FinalDestination = [Microsoft.Office.RecordsManagement.RecordsRepository.EcmDocumentRouter]::GetFinalRoutingDestinationFolderUrl($item)


I keep getting this error.


Method invocation failed because [Microsoft.Office.RecordsManagement.RecordsRepository.EcmDocumentRouter] doesn't contain a method named 'GetFinalRoutingDestinationFolderUrl'. At line:18 char:120 + $s = [Microsoft.Office.RecordsManagement.RecordsRepository.EcmDocumentRouter]::GetFinalRoutingDestinationFolderUrl <<<< ($item) + CategoryInfo : InvalidOperation: (GetFinalRoutingDestinationFolderUrl:String) [], RuntimeException + FullyQualifiedErrorId : MethodNotFound


What am I doing wrong? My reading of Microsoft documentation appears to suggest it is a method.








0 commentaires:

Enregistrer un commentaire