StormRider01
StormRider01

Reputation: 463

PowershellGet missing from Windows 10 ver 1709

I was attempting to install the lastest VMWare PowerCLI, and I get an error: Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function...

Some digging shows that I don't have PowershellGet installed, and all of the documentation/downloads either say "Out of the box", or run install-module to install PowershellGet, as there's not a download available for Windows 10.

I don't have a PowershellGet folder in C:\Program Files\WindowsPowerShell\Modules, but I do have PackageManagement.

Where do I find a download for PowershellGet?

Windows 10 version 1709

$PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.16299.248
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.16299.248
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Upvotes: 2

Views: 2187

Answers (3)

Patrick Burwell
Patrick Burwell

Reputation: 171

Get-Module -ListAvailable Microsoft*| Select name | Out-String | % {$_ -replace "Name"}|% {$_ -replace "-"}|% {$_ -replace " "} |out-file -filepath .\ModulesbyName_Microsoft.txt
Wait-Event -Timeout 5
Get-Content -Path .ModulesbyName_Microsoft.txt | Import-Module -verbose

Upvotes: 0

Greg Askew
Greg Askew

Reputation: 133

Install-Module is built in to PowerShell in Windows 10 so it should be present.

This can occur if the Language Mode is not Full Language. I've experienced this with Constrained Language Mode, but haven't tested the others.

Language Mode is controlled by the variable __PSLockdownPolicy. Constrained Language Mode was designed to limit the functionality available to non-administrator users when used with other products like AppLocker or Device Guard User Mode Code Integrity (UMCI).

More information:

https://blogs.msdn.microsoft.com/powershell/2017/11/02/powershell-constrained-language-mode/

https://blogs.technet.microsoft.com/kfalde/2017/01/20/pslockdownpolicy-and-powershell-constrained-language-mode/

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_language_modes

Upvotes: 1

Sambardo
Sambardo

Reputation: 754

Check out the PowerShellGallery and you should find everything you need to install PowershellGet. Also its a nice GUI browser for modules.

Upvotes: -1

Related Questions