You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Repository navigation
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
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.
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?
Activity
Velocet commentedon 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 commentedon 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 commentedon 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.
Merge pull request #2 from PowerShell/development
Squashed commit of the following: