Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
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

Description

@kilasuit

As per issue PowerShell/PowerShell#2292 - Reported by Florian Feldhaus (@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 Manikyam Bavandla (@bmanikm) @JKeithB Andy Jordan (@andschwa)

Activity

  1. Velocet commented on Oct 1, 2016

    @Velocet
    Contributor

    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...

  2. Jaykul commented on Oct 1, 2016

    @Jaykul

    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?

  3. bmanikm commented on Oct 5, 2016

    @bmanikm
    Contributor

    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.

  4. added a commit that references this issue on Jan 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions