pspete / psPAS

PowerShell module for CyberArk Privileged Access Security REST API
https://pspas.pspete.dev
MIT License
286 stars 90 forks source link

multiple users recieving error attempting to run new-passession #440

Closed tallyn closed 1 year ago

tallyn commented 1 year ago

Describe the issue Invoke-PASRestMethod : The term 'Get-PASResponse' is not recognized as the name of a cmdlet, function, script file, or operable program.

To Reproduce Steps to reproduce the behavior: running the following: $loginurl = azuresso url here $token = New-SAMLInteractive -LoginIDP $loginurl New-PASSession -BaseURI https://XXXXXX.privilegecloud.cyberark.com -samlauth -SAMLResponse $token

Expected behavior a passession should build

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



<--Console Output Goes Here-->

Invoke-PASRestMethod : The term 'Get-PASResponse' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of
the name, or if a path was included, verify that the path is correct and try again.
At line:451 char:19
+                 $PASSession = Invoke-PASRestMethod @LogonRequest
+                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-PASResponse:String) [Invoke-PASRestMethod], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Invoke-PASRestMethod

**Your Environment**
Include relevant details about your environment

* PowerShell Version:
* psPAS Version: 5.4.101
* CyberArk Version: cloud

**Additional context**
i haven't upgraded my pspas module in awhile, running 5.2.59 is still working.  but multiple folks in my company have started getting this exact error after fresh pspas installs
tallyn commented 1 year ago

spot-checking it seems all of the required functions are not being installed in the /private directory when installing from powershell gallery.

pspete commented 1 year ago

Hi @tallyn,

There are no known issues installing from the PowerShell Gallery for the latest release, and no reports from anyone else on the topic.... I just installed from the gallery & imported the module myself without issue to confirm. feel free to direct your colleagues to the manual installation method: https://pspas.pspete.dev/docs/install/#pspas-release

When downloading a release for manual installation, remember to unblock the downloaded archive before extraction to avoid Windows blocking access to the files, which manifests in much the same way you describe in your report.

pspete commented 1 year ago

Closing - no response