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
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