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

Environment Variable / User Rights Interfering with PowerShell credential calls #369

Open
EHoward99 opened this issue Feb 18, 2022 · 1 comment

Comments

@EHoward99
Copy link

We recently installed safeguard-ps on a Citrix server and the Get-SafeguardA2aPassword calls keep spitting out the following error. I don't know why the call is validating that the user have access to a file share defined in the LIB variable when the call itself doesn't seem to use this variable. Any thoughts on how to resolve this without redefining a bunch of user rights on the server? This server is used by multiple applications, so we'd rather not mess too much with the variables either. Thanks

PS C:\Windows\SysW0W64\WindowsPowerShell\vl.O> J:\AlphaOne\Test - QA AlphaOne CNAV-785\A1_INAV_QA_API.psi

Add-Type : (O) : Warning as Error: Invalid search path '\njfile01\xxxxxxx\SQL157\OCS-15_0\lib' specified in 'LIB environment variable' — 'Access is denied. '

(1) : using System.Net.Security;

At C:\Program Files\WindowsPowerShell\Modules\safeguard-ps\6.8.631\sslhandling.psml:38 char:9 + Add-Type -TypeDefinition

  • Categorylnfo : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception

  • FullyQualifiedErrorld : SOURCE_CODE_ERROR.Microsoft.PowerShell.Commands.AddTypeCommand

@petrsnd
Copy link
Member

petrsnd commented Apr 12, 2022

@EHoward99 safeguard-ps is implementing the -Insecure flag by trying to ignore TLS certificate validation, which is difficult across multiple versions of of PowerShell on multiple platforms. The line that it is complaining about is attempting to add a type to the PowerShell environment that is explicitly defined in C# code. I've never seen this error before. Can you execute your command without using the -Insecure flag?

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

2 participants