Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

[PowerShell] - Make Install-Module automatically install in CurrentUser scope for non admin users #2

Closed
kilasuit opened this issue Sep 30, 2016 · 3 comments

Comments

@kilasuit
Copy link

As per issue PowerShell/PowerShell#2292 - Reported by @ffeldhaus - moving this here as the home for PowerShellGet module for possible further discussion.

This is a feature request. Currently Install-Module gives a warning in Windows PowerShell if it is not run with admin privileges and -Scope CurrentUser is not specified.

As many users just expect Install-Module to work and as the ability to install Modules in the current users scope is one of the key advantages of PowerShell, it would be a great enhancement if the default behaviour of Install-Module would be to automatically install the Module in the current user scope if it is run with non admin privileges.

cc @bmanikm @JKeithB @andschwa

@Velocet
Copy link
Contributor

Velocet commented Oct 1, 2016

But sometimes it happens that you forget to fire up a shell with admin rights...

So a warning message is a good thing in this case...

@Jaykul
Copy link

Jaykul commented Oct 1, 2016

Tt's possible to distinguish between a non-elevated administrator and a non-administrator, right? So perhaps a warning (or the current behavior) for non-elevated administrators, and silently doing the right thing for other users?

@bmanikm
Copy link
Contributor

bmanikm commented Oct 5, 2016

As discussed in PowerShell/PowerShell#2292 I have improved the error message in #4 to detect and throw proper error message in Linux and Mac.

@bmanikm bmanikm closed this as completed Oct 12, 2016
alerickson added a commit that referenced this issue Jan 8, 2021
Update version and changelog (#627)
nakolas69 added a commit to nakolas69/PowerShellGetv2 that referenced this issue Aug 10, 2021
commit 29e0c9f
Author: Amber Erickson <americks@microsoft.com>
Date:   Fri Jan 8 13:18:12 2021 -0800

    Add ci yaml

commit 46ab520
Merge: a5b6393 f45bfe1
Author: alerickson <25858831+alerickson@users.noreply.github.com>
Date:   Fri Nov 20 11:47:06 2020 -0800

    Merge pull request PowerShell#2 from PowerShell/development

    Update version and changelog (PowerShell#627)

commit a5b6393
Author: Amber Erickson <americks@microsoft.com>
Date:   Tue Sep 15 16:37:46 2020 -0700

    Update version and changelog
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants