Sunday, February 11, 2018

Installing a PowerShell module for all instances

Downloaded PowerShell modules can be imported into the current session using the Import-Module cmdlet. To have them be available automatically, they must be placed in an appropriate folder. To affect all users on the machine, they go in:

C:\Program Files\WindowsPowerShell\Modules

To affect only the current user, they go in:

~\Documents\WindowsPowerShell\Modules

...where ~ is the user's home directory.

The module folder must be named exactly the same as the file title of the module manifest (the PSD1 file).

No comments:

Post a Comment