The Install-Module command
The Install-Module command installs or updates modules from the PowerShell Gallery or any other configured repository. By default, Install-Module adds modules to the path for AllUsers, C:\Program Files\WindowsPowerShell\Modules.
Note
Access rights
Installing a module under the AllUsers scope requires a user account control administrator token (run as administrator).
For example, the posh-git module may be installed using either of the following two commands:
Find-Module posh-git | Install-Module
Install-Module posh-git Modules may be installed under a user-specific path ($home\Documents\WindowsPowerShell\Modules) using the Scope parameter:
Find-Module carbon -Scope CurrentUserIf the most recent version of a module is already installed, the command ends without providing feedback. If a newer version is available that will be automatically installed alongside the original (in a folder named after the version if using PowerShell 5.0).
Reinstallation of an existing version...