Forum Discussion

uzhxhqyd39's avatar
uzhxhqyd39
Brass Contributor
Jan 27, 2022

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

Hi,

 

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

https://github.com/pnp/powershell/discussions/453

 

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

 

Thanks!

  • 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.
    • uzhxhqyd39's avatar
      uzhxhqyd39
      Brass Contributor
      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?

Resources