Skip to content

Install-PSResource does not display error with access denied failure #456

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

Closed
3 tasks done
PaulHigin opened this issue Aug 10, 2021 · 1 comment
Closed
3 tasks done

Comments

@PaulHigin
Copy link
Contributor

Prerequisites

  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues.

Steps to reproduce

  1. Run PowerShell in a non-Admin Windows account.
  2. Run Install-PSResource with -Scope AllUsers and -Verbose switch.

Since non-Admin accounts do not have access permissions to install a module with AllUsers scope, the install fails, but no error is displayed.

Expected behavior

PS> Install-PSResource Microsoft.PowerShell.SecretStore -Repository PSGallery -Scope AllUsers -Verbose
Error: Cannot access install path...

Actual behavior

PS> Install-PSResource Microsoft.PowerShell.SecretStore -Repository PSGallery -Scope AllUsers -Verbose
...
VERBOSE: Unable to successfully install package 'Microsoft.PowerShell.SecretManagement': 'Access to the path '.nupkg.metadata' is denied.'
...

Error details

No response

Environment data

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Binary     3.0.11     beta       PowerShellGet                       {Find-PSResource, Get-InstalledPSResource, Get-PS…

Name                           Value
----                           -----
PSVersion                      7.2.0-preview.8
PSEdition                      Core
GitCommitId                    7.2.0-preview.8-36-g0a342601c8ce9527dac560a9e6709e7f70f2cd9c
OS                             Microsoft Windows 10.0.19043
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

@anamnavi
Copy link
Member

anamnavi commented Nov 5, 2021

@anamnavi anamnavi closed this as completed Nov 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants