psPAS icon indicating copy to clipboard operation
psPAS copied to clipboard

Get-PASAccountDetail -id $Acc.id takes forever

Open JCallPut opened this issue 1 year ago • 3 comments

Getting account details using following snippet: $testAccDetails=Get-PASAccountDetail -id $Acc.id

$Acc is actual account object.

Problem is, each run of this code takes between 1 and 6 minutes, even though similar actions via PVWA are in seconds.

Pinpointed this issue to the following psPAS code section: $APIResponse = Invoke-WebRequest @PSBoundParameters -ErrorAction Stop

Tried to add $ProgressPreference = 'SilentlyContinue' right before invoke-webrequest to no avail.

Code works, but unacceptably slow. Unrelated to backend performance.

Expected behavior Performance matching or exceeding PVWA.

Your Environment

  • PowerShell Version: 7.4.2 using VS Code
  • psPAS Version: latest, 6.4.80
  • CyberArk Version: 12.6

JCallPut avatar May 21 '24 20:05 JCallPut

https://pspas.pspete.dev/docs/troubleshooting/#manual-api-command-testing Follow the troubleshooting guide to confirm if this persists outside the module.

pspete avatar May 21 '24 21:05 pspete

Running same code against DEV environment returned result in sub-second, so not a code issue.

JCallPut avatar May 24 '24 20:05 JCallPut

So sounds like an environment issue / not related to the module

pspete avatar May 24 '24 22:05 pspete

No recent update, closing as does not appear related to the module code

pspete avatar Jun 04 '24 19:06 pspete