Skip to content

When I upgrade to Powershell 7.0.0 I'm unable to load powershellget and get errors pointing to importing Microsoft.Powershell.utility #12040

Description

@sheldonhull
  • Make sure you are able to repro it on the [latest released version]: 7.0.0
  • Search the existing issues.
  • Refer to the FAQ.
  • Refer to the known issues.

Steps to reproduce

Upgraded powershell from powershell.exe prompt to avoid conflicts to 7.0.0. Rebooted to avoid this issue being environment scoped.

choco upgrade powershell-core
Get-InstalledModule powershellget
# OR
Import-Module PowershellGet

Expected behavior

Return the module without error.

Actual behavior

InvalidOperation: C:\Users\USERNAME\Documents\WindowsPowerShell\Modules\PowerShellGet\2.2.1\PSModule.psm1:327 
Line |  327 |      $NoMatchFound = $LocalizedData.NoMatchFound     
~~~~~~~~~~~~~~
| The variable '$LocalizedData' cannot be retrieved because it has not been set.

When trying to import powershellget i've also found the error a little more specific:

Import-LocalizedData: C:\Users\USERNAME\Documents\WindowsPowerShell\Modules\Powershellget\2.2.1\PSModule.psm1:1
Line |
   1 |  Import-LocalizedData LocalizedData -filename PSGet.Resource.psd1
     |  ~~~~~~~~~~~~~~~~~~~~
     | The 'Import-LocalizedData' command was found in the module
     | 'Microsoft.PowerShell.Utility', but the module could not be loaded. For more
     | information, run ....

Trying to run the suggested command Import-Module Microsoft.Powershell.utility and I get the following:

Import-Module: Failed to generate proxies for remote module 'Microsoft.PowerShell.Utility'. The 'Export-PSSession' command was found in the module 'Microsoft.PowerShell.Utility', but the module could not be loaded. For more information, run 'Import-Module Microsoft.PowerShell.Utility'.

Environment data


Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18363
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-AnsweredThe question is answered.

    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