A community member has associated this post with a similar question:
Install-Module SharePointPnPPowerShellOnline fails

Only moderators can edit this content.

Install-Module SharePointPnPPowerShellOnline fails

Sowmya S 1 Reputation point
2020-12-31T06:50:33.407+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

Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,322 questions
0 comments No comments
{count} votes