# PowerShellGet commands not working -\> $LocalizedData not set

**URL:** <https://forums.powershell.org/t/powershellget-commands-not-working-localizeddata-not-set/4863>\
**Category:** DSC\
**Created:** [September 10, 2015, 8:12pm UTC](https://forums.powershell.org/t/powershellget-commands-not-working-localizeddata-not-set/4863 "2015-09-10T20:12:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter-cabus](https://avatars.discourse-cdn.com/v4/letter/p/b5a626/32.png) [@peter-cabus](https://forums.powershell.org/u/peter-cabus)\
**Post date:** [September 10, 2015, 8:12pm UTC](https://forums.powershell.org/t/powershellget-commands-not-working-localizeddata-not-set/4863/1 "2015-09-10T20:12:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peter-cabus](https://avatars.discourse-cdn.com/v4/letter/p/b5a626/32.png) [@peter-cabus](https://forums.powershell.org/u/peter-cabus)\
**Post date:** [September 10, 2015, 9:31pm UTC](https://forums.powershell.org/t/powershellget-commands-not-working-localizeddata-not-set/4863/2 "2015-09-10T21:31:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 9:17pm UTC](https://forums.powershell.org/t/powershellget-commands-not-working-localizeddata-not-set/4863/3 "2024-05-16T21:17:15Z")

</div>


