Search notes:

PowerShell cmdLet Install-Module

install-module downloads a module from a repository and installs it.

-scope

The module can be installed for all users or for the current user, the default being for all users:
PS:> install-module -name SQLServer -scope currentUser
PS:> install-module -name SQLServer
Administrator privileges are required to install a module for all users.

Showing available commands in a module

After installing a module, it's commands can be shown with get-command:
PS:> install-module -name fooBarBaz
PS:> get-command  -module fooBarBaz

You are installing the modules from an untrusted repository …

PS C:\> install-module -name SqlServer
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
…

PS C:\> get-psRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2

PS C:\> set-psRepository -name PSGallery -installationPolicy trusted

PS C:\> get-psRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Trusted              https://www.powershellgallery.com/api/v2

PS C:\> install-module -name SqlServer

See also

Powershell command noun: module

Index