1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 22:02:07 +02:00
tldr/pages/windows/install-module.md
Reinhart Previano Koentjoro e44fd29d4c
windows/*: add more PowerShell commands (#11612)
* windows/*: add more PowerShell commands

* get-commandL fix typo

* Update install-module.md

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
2023-11-30 08:09:50 +01:00

36 lines
1.1 KiB
Markdown

# Install-Module
> Install PowerShell modules from PowerShell Gallery, NuGet, and other repositories.
> More information: <https://learn.microsoft.com/powershell/module/powershellget/install-module>.
- Install a module, or update it to the latest available version:
`Install-Module {{module}}`
- Install a module with a specific version:
`Install-Module {{module}} -RequiredVersion {{version}}`
- Install a module no earlier than a specific version:
`Install-Module {{module}} -MinimumVersion {{version}}`
- Specify a range of supported versions (inclusive) of the required module:
`Install-Module {{module}} -MinimumVersion {{minimum_version}} -MaximumVersion {{maximum_version}}`
- Install module from a specific repository:
`Install-Module {{module}} -Repository {{repository}}`
- Install module from specific repositories:
`Install-Module {{module}} -Repository {{repository1 , repository2 , ...}}`
- Install the module for all/current user:
`Install-Module {{module}} -Scope {{AllUsers|CurrentUser}}`
- Perform a dry run to determine which modules will be installed, upgraded, or removed through `Install-Module`:
`Install-Module {{module}} -WhatIf`