How to identify the file uploading is completed using Set-IshDocumentObj?

Hi,

I am automating a step to upload the document using the below script. I wanted to know that how my code identify that the result of Set-IshDocumentObj is success or failed. Is there any way to check the status of this activity?

Set-IshDocumentObj

-IshSession $ishSession `
-LogicalId $logicalId `
-Version $version `
-Lng $lang `
-Metadata (Set-IshMetadataField -Name "FSTATUS" `
-Level Lng `
-ValueType "Element" `
-Value "VSTATUSTRANSLATIONINREVIEW") `
-FilePath $filePath |Out-File -FilePath $TestPath

emoji