2

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?

Marcello Miorelli
  • 3,368
  • 4
  • 44
  • 67
  • 1
    PowerShell 6.0 was released in Jan 2018 and end-of-life in Feb 2019. Perhaps it's time to upgrade to a more modern version of PowerShell than 4.0 and 5.0? – AlwaysLearning Apr 24 '21 at 10:28
  • it is very kind of you to remind me of this undisputed fact, however, other than upgrading, anything else you can think of in order for the modules to start showing in the drop down list? – Marcello Miorelli Apr 24 '21 at 11:39
  • 1
    I have been looking at [upgrading to powershell 7](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?WT.mc_id=THOMASMAURER-blog-thmaure&view=powershell-7) – Marcello Miorelli Apr 24 '21 at 11:42
  • Does this answer your question? [Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet](https://stackoverflow.com/q/41585758/2029983) – Thom A Apr 24 '21 at 11:51
  • Do they just not _show in the GUI_ or are they also _not available_ in the session? – mklement0 Apr 24 '21 at 13:44
  • 1
    Since you're thinking about upgrading to PowerShell 7, let me add some info on the future of the Windows PowerShell ISE: – mklement0 Apr 24 '21 at 15:03
  • 1
    The PowerShell ISE is [no longer actively developed](https://docs.microsoft.com/en-us/powershell/scripting/components/ise/introducing-the-windows-powershell-ise#support) and [there are reasons not to use it](https://stackoverflow.com/a/57134096/45375) (bottom section), notably not being able to run PowerShell [Core] 6+. The actively developed editor that offers the best PowerShell development experience, across platforms, is [Visual Studio Code](https://code.visualstudio.com/), combined with its [PowerShell extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell). – mklement0 Apr 24 '21 at 15:03
  • 1
    @mklement0 thank you for the links - exactly what I needed, I was already looking for a ISE for PowerShell 7, I am glad and thankful that you posted these links – Marcello Miorelli Apr 24 '21 at 15:13

1 Answers1

1

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

Marcello Miorelli
  • 3,368
  • 4
  • 44
  • 67