Skip to content

Importing module Microsoft.PowerShell.Archive fails because of culture not available when connecting from non en-US client to an en-US client via PSSession #57

Open
@mlawindi

Description

@mlawindi

Repro Steps:

  • Using a en-GB client (with thread culture and uiculture set to en-GB),
    - CurrentUICulture : en-GB
    - CurrentCulture : en-GB
  • Connect to an en-US remote machine using Enter-PSSession.
  • Run import-module Microsoft.Powershell.Archive -force will fail with:
    Import-LocalizedData : Cannot find the Windows PowerShell data file 'ArchiveResources.psd1' in directory 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.Powershell.Archive\en-GB', or in any parent
    culture directories.
    At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Microsoft.Powershell.Archive\Microsoft.PowerShell.Archive.psm1:27 char:1
  • Import-LocalizedData LocalizedData -filename ArchiveResources
  •   + CategoryInfo          : ObjectNotFound: (C:\Windows\syst...eResources.psd1:String) [Import-LocalizedData], PSInvalidOperationException
      + FullyQualifiedErrorId : ImportLocalizedData,Microsoft.PowerShell.Commands.ImportLocalizedData
    
    
    

Is this expected? Shouldn't it use en-US since no en-GB on the remote machine?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions