PowerShellGet commands not working -> $LocalizedData not set

This topic contains 1 reply, has 1 voice, and was last updated by Profile photo of Peter Cabus Peter Cabus 1 year, 1 month ago.

  • Author
  • #29663
    Profile photo of Peter Cabus
    Peter Cabus

    When I run for example the following command:
    Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

    I get the following error:
    PackageManagement\Set-PackageSource : The variable '$LocalizedData' cannot be retrieved because it has not been set.
    At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSGet.psm1:1673 char:17
    + ... $null = PackageManagement\Set-PackageSource @PSBoundParameters
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (LocalizedData:String) [Set-PackageSource], Exception
    + FullyQualifiedErrorId : VariableIsUndefined,Microsoft.PowerShell.PackageManagement.Cmdlets.SetPackageSource

    Any ideas? I have to admit that I'm a Powershell newby.

  • #29665
    Profile photo of Peter Cabus
    Peter Cabus

    Found the problem. The PowShellGet folder under Program files\WindowsPowerShell\Modules did not contain a folder for my culture "en-GB".

You must be logged in to reply to this topic.