how to install a Powershell module in Powershell 4?

4.1k views Asked by At

I have some machines on Powershell 4

enter image description here

In these machines even after I have placed the new powershell modules within the module path they don't show up in the Modules drop down list - as above.

when I do the same thing in machines that are on Powershell 5 I can see the new modules in the Modules drop down list as below.

enter image description here

what else I have to do in order to make the new modules show up in the modules drop down on Powershell 4?

1

There are 1 answers

0
Marcello Miorelli On BEST ANSWER

Following the link provided by Larnu in the comments

After I found the powershell module file .psm1 and run the following command:

import-Module  "C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.141\dbatools.psm1"

enter image description here