Author Posts

November 22, 2017 at 5:06 am

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.

November 22, 2017 at 12:54 pm

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

November 22, 2017 at 10:33 pm

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'
'blogs.msdn.microsoft.com/powershell/2016/09/29/powershellget-and-packagemanagement-in-powershell-gallery-and-github'

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.