[3.0.0-beta10] Install-Module fails with OneDrive - Access to cloud file is denied
See original GitHub issuePowerShellGet Version: 2.2.5/3.0.0-beta PowerShell: Windows PowerShell 5.1
This issue does not exist with version 2.2.4.1. I’m on a corporate machine so our profile is tied to OneDrive, hence my Documents folder is stored there as well. I’m not sure if this may be related to what was reported on #262 but cannot confirm because policy blocks me from disabling the Files-On-Demand setting for OneDrive.
Repo steps:
- Install PowerShellGet 2.2.5
- Run
Install-Module <any module>
- Receive error
PackageManagement\Install-Package : Access to the cloud file is denied
Attaching the verbose output for reference:
Additional
I have also repeated the repo steps for the 3.0.0-beta and receive the same error but in various scenarios.
If I have 2.2.5 installed as well then the 3.0.0 seems to reference the 2.2.5 version of PSModule file:
[PS 5.1] [22:01:09] [ 82.0ms ] C:\Users\SMelton
[2] > ipmo PowerShelLGet -RequiredVersion 3.0.0
[PS 5.1] [22:01:18] [103.0ms ] C:\Users\SMelton
[3] > Get-Module PowerShelLGet
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 3.0.0 PowerShelLGet {Find-PSResource, Get-PSResource, Get-PSResourceRepository...
[PS 5.1] [22:01:22] [ 25.0ms ] C:\Users\SMelton
[4] > Install-Module Pester -AllowPrerelease -Force
PackageManagement\Install-Package : Access to the cloud file is denied
At C:\Users\SMelton\OneDrive - Thycotic
Corporate\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1:9711 char:34
+ ... talledPackages = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exce
ption
+ FullyQualifiedErrorId : System.ComponentModel.Win32Exception,Microsoft.PowerShell.Commands.RemoveItemCommand,Mic
rosoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
I delete 2.2.5 completely and then install 3.0.0-beta10, upon import in a new session I get the Access to the cloud file is denied
on the initial import. I issue the import again and it succeeds, but on the call to Install-Module
the error still occurs, this time referencing the 2.2.4.1 PSModule file:
Issue Analytics
- State:
- Created 3 years ago
- Reactions:9
- Comments:25 (6 by maintainers)
Issue-Label Bot is automatically applying the label
bug
to this issue, with a confidence of 0.94. Please mark this comment with 👍 or 👎 to give our bot feedback!Links: app homepage, dashboard and code for this bot.
@SteveL-MSFT does that mean this fix will not be pushed down to Windows PowerShell?