Install-Module SharePointPnPPowerShellOnline fails

Sowmya S 1 Reputation point
2020-12-31T06:52:08.027+00:00

The powershell script which has "Install-Module -Name 'SharePointPnPPowerShellOnline'" fails if I execute from excel vba script.

But The powershell script executes fine from powershell console.

Below is the error:

SharePointPnPPowerShellOnline Module does not exist. Installing the Module .....
PackageManagement\Install-Package : Package 'SharePointPnPPowerShellOnline' failed to be installed because: Could not
find file 'C:\Users\userid\AppData\Local\Temp\ngum3acm\AngleSharp.Css.dll'. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidResult: (SharePointPnPPowerShellOnline:String) [Install-Package], Exception + FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement
.Cmdlets.InstallPackage

{count} votes

1 answer

Sort by: Most helpful
  1. Yi E Wang 646 Reputation points
    2021-01-04T06:21:27.173+00:00

    Hi,

    As you had mentioned that "The powershell script executes fine from powershell console", so, this has nothing to od wiht PowerShell. then, we should manually remove the windows-server-powershell tag, thank you for your understanding.

    Best Regards,
    Eve Wang.