Venafi / VenafiPS

Powershell module to fully automate your Venafi TLS Protect Datacenter and Cloud platforms!
https://venafips.readthedocs.io/
Apache License 2.0
18 stars 7 forks source link

Move-TPPObject fails in try/catch #185

Closed cmblackburn closed 1 year ago

cmblackburn commented 1 year ago

When utilizing the Move-TPPObject cmdlet inside of a try/catch statement there is an error and the object will not be moved, the error states "Unable to read object details of \VED\Policy\Testing\whatever.net; ObjectDoesNotExist

Identical code outside of the try/catch statement works successfully

gdbarron commented 1 year ago

Please provide all the details requested in the bug issue template.

cmblackburn commented 1 year ago

Environment

Operating System:  Windows Server 2012
VenafiPS version:  5.3.1
PowerShell version:  5.1
TPP version (if applicable):  21.4

Steps to reproduce

Try{Move-Tppobject -sourcepath '\ved\policy\mycert' -targetpath '\ved\policy\yourcert'

Expected behavior

Move the object in the source path to the a new object in the traget path

Actual behavior

The object is not moved and there is an exception error stating that the target object does not exist

Screenshots