Skip to content

Get-PASSafe -search xxx-sort asc fails #542

Open
@begunrom

Description

@begunrom

Get-PASSafe -search xxx-sort asc fails with

`Invoke-PASRestMethod : [400] Cannot sort by a property other than [safename, managingcpm].
At line:230 char:13

  • ... $result = Invoke-PASRestMethod -Uri $URI -Method GET -WebSession $S ...
    • CategoryInfo : NotSpecified: ({"ErrorCode":"P...managingcpm]."}:ErrorRecord) [Invoke-PASRestMethod], Exception
    • FullyQualifiedErrorId : PASWS014E,Invoke-PASRestMethod`

The parameters on the function force you to either select asc or desc, while the rest call expects safename or managingcpm

`PS C:\Users\adm-guro> Get-PASSafe -search XXX -sort managingcpm
Get-PASSafe : Cannot validate argument on parameter 'sort'. The argument "managingcpm" does not belong to the set "asc,desc" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again.
At line:1 char:31

  • Get-PASSafe -search XXX -sort managingcpm
    • CategoryInfo : InvalidData: (:) [Get-PASSafe], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Get-PASSafe`

Your Environment

  • psPAS Version: v6.4.85
  • CyberArk Version: 14.0

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