Install PnP.PowerShell modules fails with not a properly-formed module warning

Occasional Contributor



I'm trying to install PnP.PowerShell on a Windows 2012 R2 server and it's not installing.


All I get is:

VERBOSE: Hash for package 'PnP.PowerShell' does not match hash provided from the server.
VERBOSE: InstallPackageLocal' - name='PnP.PowerShell', version='1.9.0',destination='C:\Users\...\AppData\Local\Temp\2\462159576'
WARNING: The module 'PnP.PowerShell' cannot be installed or updated because it is not a properly-formed module.


On the Windows Server this is the PowerShell version:
Major Minor Build Revision
-----  -----  ----- --------
5       0       10586     117



Get-Module PnP.PowerShell -ListAvailable returns nothing, so no module is installed


There is another discussion on github without any results, either


Can you give me a hint how get PnP.PowerShell installed?



3 Replies
install-module pnp.powershell should work (Just tried it on a Windows server), perhaps the TLS settings? First run [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12 and then try the install-module pnp.powershell again.
Thanks for that input, unfortunately it didn't help. Get the same warning and the module is not installed
- Did you specify a specific version? Default what is tried to install is 1.9.0
- is it required to update somehow the link to the powershellgallery?
Didn't install a specific version, just the install-module pnp.powershell. Perhaps uninstalling the old module SharePointPnPPowerShellOnline is you used that before?