Hi,
I am on powershell version 4 . How to install modules like cchoco in powershell version 4 .In version 5 we have install-module but m not able to find anything like that for version 4 .Updating powershell is not an option.
PS > $PSVersionTable.PSVersion
Major Minor Build Revision
4 0 -1 -1
Thanks in advance.
Install-Module was introduced with Powershell v5 if I remember correctly. It, and the other module/package management cmdlets aren’t available in PowerShell v4.
You’ll need to upgrade at least one machine to PowerShell v5.1. You can download to that machine and copy out to other machines - assuming that the module you want will work with PowerShell v4
No need to upgrade to PoSH v5 for this.
You can get PowerShellGet, which is what provides this in PoSH v4. You just have to download and install it.
‘microsoft.com/en-us/download/details.aspx?id=51451’
‘PowerShellGet and PackageManagement in PowerShell Gallery and GitHub - PowerShell Team’
I have it on all my PoSH v4 installs as a default.
But, yep, if you can go to PoSH v5, it’s best to do so.