Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export-PASPSMRecording does not respect filename in path #551

Open
dot-mike opened this issue Nov 29, 2024 · 1 comment
Open

Export-PASPSMRecording does not respect filename in path #551

dot-mike opened this issue Nov 29, 2024 · 1 comment

Comments

@dot-mike
Copy link

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
@dot-mike
Copy link
Author

Workaround:

Rename-Item -Path $(Join-Path -Path $(Get-Location) -ChildPath "$($recording.SessionGuid).VID.avi") -NewName "PSMRecording.avi"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant