Installing Modules in PowerShell Core on Linux

by Sep 12, 2017

When you’d like to install modules for all users from the PowerShellGet repository, you need Administrator privileges. On PowerShell Core on Linux, you can use the command “sudo” to enable Administrator privileges, and run PowerShell. Just make sure you specify the command in braces.

This would install the module AzureRM.NetCore from the PowerShell Gallery with administrator privileges for all users on PowerShell Core on Linux:

sudo powershell -Command {Install-Module -Name AzureRM.Netcore}

Twitter This Tip! ReTweet this Tip!