VMware Cloud Community
berobero
Contributor
Contributor

How to install PowerCLI on Linux for all users?

I would like to install PowerCLI on Ubuntu 16.04 "globally" such that all users can run it.

The published instructions appear to be aimed for single-user installation.

How can I install it once and allow all users to use it?

Thank you!

0 Kudos
1 Reply
LucD
Leadership
Leadership

Normally PowerShell Core, when installed on a Linux box, will be accessible for everyone, provided the permissions are set correctly.

For the PowerCLI Core modules you will have to install them in a module folder that is accessible to everyone, instead of in the ~/.local/share/powershell/Modules directory as the documentation says.

There are, just in PowerShell 5.*, as number of folders where you can install modules.

Check the values in the $env:PSModulePath environment variable.

One of the directories in there is /usr/local/share/powershell/Modules.

Unzip the files in that directory, and the PowerCLI Core modules should be available to all accounts on the box.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos