Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@wsmelton

Description

@wsmelton
Issue body actions

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.