PowerShellGet commands not working -> $LocalizedData not set

Welcome Forums DSC (Desired State Configuration) PowerShellGet commands not working -> $LocalizedData not set

This topic contains 1 reply, has 1 voice, and was last updated by

3 years, 4 months ago.

  • Author
  • #29663

    Points: 0
    Rank: Member

    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

    Points: 0
    Rank: Member

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

The topic ‘PowerShellGet commands not working -> $LocalizedData not set’ is closed to new replies.