Skip to content
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.

Unable to save or install MS provided modules from gallery #667

Description

We are unable to install MS provided modules in the gallery. 3rd party seem to work. I assume there is some sort of additional validation involved.

Steps to reproduce

Save-Module exchangeonlinemanagement -Repository psgallery -Path . -verbose -Force -AllowPrerelease
Save-Module exchangeonlinemanagement -Repository psgallery -Path . -verbose -Force

Expected behavior

this should save the module to the local folder. 

Actual behavior

WARNING: Package 'ExchangeOnlineManagement' failed to be installed because: Unknown block type. Stream might be corrupted.
WARNING: Package 'ExchangeOnlineManagement' failed to install.
VERBOSE: A task was canceled.
VERBOSE: A task was canceled.
PackageManagement\Save-Package : Unable to save the module 'ExchangeOnlineManagement'.
At C:\Users\user\Documents\WindowsPowershell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exception
    + FullyQualifiedErrorId : ProviderFailToDownloadFile,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

WARNING: Package 'ExchangeOnlineManagement' failed to be installed because: A local file header is corrupt.
WARNING: Package 'ExchangeOnlineManagement' failed to install.
PackageManagement\Save-Package : Unable to save the module 'ExchangeOnlineManagement'.
At C:\Users\user\Documents\WindowsPowershell\Modules\PowerShellGet\2.2.5\PSModule.psm1:11794 char:21
+             $null = PackageManagement\Save-Package @PSBoundParameters
+                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power...ets.SavePackage:SavePackage) [Save-Package], Exception
    + FullyQualifiedErrorId : ProviderFailToDownloadFile,Microsoft.PowerShell.PackageManagement.Cmdlets.SavePackage

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      5.1.19041.1320
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1320
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
> Get-Module -ListAvailable PowerShellGet,PackageManagement
    Directory: C:\Users\dmjones-svr\Documents\WindowsPowershell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.4.7      PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     2.2.5      PowerShellGet                       {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}


    Directory: C:\Program Files\WindowsPowerShell\Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.4.7      PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     2.2.5      PowerShellGet                       {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}

> Get-PackageProvider -ListAvailable
Name                     Version          DynamicOptions
----                     -------          --------------
msi                      3.0.0.0          AdditionalArguments
msu                      3.0.0.0
nuget                    2.8.5.208
NuGet                    3.0.0.1          Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrere...
PowerShellGet            2.2.5.0          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathU...
PowerShellGet            1.0.0.1
Programs                 3.0.0.0          IncludeWindowsInstaller, IncludeSystemComponent

Activity

  1. StevenBucher98 commented on Jan 12, 2022

    @StevenBucher98
    Collaborator

    Thanks for your issue David Jones (@BladeFireLight)! We were unable to reproduce this issue and are no longer supporting PowerShellGetv2.
    What version of .NET are you running and can you possibly try the latest PowerShellGet v3 preview and see if this is still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions