Skip to content

Export-PASPSMRecording does not respect filename in path #551

Open
@dot-mike

Description

@dot-mike

Describe the issue
When passing a fully qualified path with filename + ext to -path parameter in Export-PASPSMRecording the commands fails to save the output.

To Reproduce
Steps to reproduce the behavior:

  1. Get recording ID
  2. Export recording with filename as part of path: Export-PASPSMRecording -RecordingID $recording.SessionID -Path $(Join-Path -Path (Get-Location) -ChildPath "test.avi") -debug -Verbose
  3. See error:
Out-PASFile : Error Saving C:\Users\username\Desktop\test.avi\GUID_GOES_HERE.VID.avi
At line:35 char:4

Expected behavior
Out-PASFile should write to path with my filename as outlined in the docs.

EXAMPLE 1
Export-PASPSMRecording -RecordingID 123_45 -path C:\PSMRecording.avi
Saves PSM Recording with Id 123_45 to C:\PSMRecording.avi

Screenshots & Console Output
If applicable, add screenshots and/or console output to help explain your problem.

PS C:\Users\username\Desktop> Export-PASPSMRecording -RecordingID $recording.SessionID -Path $(Join-Path -Path (Get-Location) -ChildPath "test.avi") -debug -Verbose
VERBOSE: POST https://pam.comapany.tld/PasswordVault/API/Recordings/123_123/Play with 0-byte payload
VERBOSE: received 26825216-byte response of content type application/save
Out-PASFile : Error Saving C:\Users\username\Desktop\test.avi\GUID_GOES_HERE.VID.avi
At line:35 char:4
+             Out-PASFile -InputObject $result -Path $path
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Could not find ...GUID_GOES_HERE.VID.avi'.:ErrorRecord) [Out-PASFile], Exception
    + FullyQualifiedErrorId : Out-PASFile

Your Environment
Include relevant details about your environment

  • PowerShell Version: 5.1.14393.7513
  • psPAS Version: 6.4.85
  • CyberArk Version: 12.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions