question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[3.0.0-beta10] Install-Module fails with OneDrive - Access to cloud file is denied

See original GitHub issue

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

  1. Install PowerShellGet 2.2.5
  2. Run Install-Module <any module>
  3. Receive error PackageManagement\Install-Package : Access to the cloud file is denied

Attaching the verbose output for reference:

failed_output_2.2.5.txt

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:

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:25 (6 by maintainers)

github_iconTop GitHub Comments

5reactions
issue-label-bot[bot]commented, Nov 8, 2020

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.

4reactions
wsmeltoncommented, Feb 21, 2021

@SteveL-MSFT does that mean this fix will not be pushed down to Windows PowerShell?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[3.0.0-beta10] Install-Module fails with OneDrive - Access ...
Receive error PackageManagement\Install-Package : Access to the cloud file is denied. Attaching the verbose output for reference:.
Read more >
Access to the cloud file is denied when install az powershell
I tried to install az powershell with the command Install-Module -Name Az -AllowClobber -Scope CurrentUser -SkipPublisherCheck -Force And ...
Read more >
OneDrive Access Denied
I have Office 365, which - as I understand it - comes with a Terabyte of space in the cloud as part of...
Read more >
Error "Access to the cloud file is denied" backing up OneDrive
To save on disk space, OneDrive (and some other cloud storage providers) use a system where some files are only "virtually" stored on...
Read more >
Remove-Item: Access to the cloud file is denied
I'm having errors trying to recursively delete a folder stored in OneDrive. I can remove individual files (as well as wildcard patterns of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found