liveBook · Manning

Install-Module

As explained in Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Install-Module is a PowerShell cmdlet that downloads and installs PowerShell modules from a package repository.

Install-Module downloads and installs PowerShell modules from a package repository such as the PowerShell Gallery. Review a module’s details and compatibility before running its code. section 7.2

Install and verify Az

Run `Install-Module -Name Az`. PowerShell may ask whether you trust PSGallery; answer `Y` to continue. Because installation does not load the module, verify it with `Get-Module Az -ListAvailable`. The displayed path and version can vary. section 7.2

Use the surrounding PowerShellGet commands to manage repository modules:

  • `Register-PSRepository` adds a repository, including an internal private gallery. section 7.2
  • `Find-Module` searches repositories; `Update-Module` installs newer local versions. section 7.2
  • Install GoogleCloud with `Install-Module -Name GoogleCloud`; later use `Import-Module GoogleCloud -Force` if first-use input is required. section 7.3

How Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS covers it

How deep it goes
Explains repository search, trust confirmation, compatibility checking, installation, and verification, but not installation internals.
Examples
Uses the Az and GoogleCloud modules, trust prompts, Get-Module verification, and installed command discovery.
What it assumes
Assumes PowerShell access and teaches repository-based module installation through copyable commands.
What you can do after
Operate/configure PowerShell by installing repository modules and verifying their availability.
How it connects
Connects module installation with PowerShell Gallery, PowerShellGet, Find-Module, Register-PSRepository, Update-Module, Import-Module, and PSModulePath.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS. The section links point to the parts of the book it draws on.