Now that I鈥檓 using a Windows 10 laptop for working from home, I decided to try using PowerShell Core and discovered the following error when attempting to run the Get-WinUserLanguageList cmdlet. I鈥檓 not a programmer (mostly a GNU/Linux sysadmin) and I was never particularly proficient at PowerShell but this looks like C#/.NET error.
The Get-WinUserLanguageList cmdlet is provided by the International module which is listed as being compatible with Core, Desktop. The cmdlet works in Windows PowerShell 5.1 and not in PowerShell Core 7.1 so I hope I鈥檓 reporting this bug to the right place. If not, let me know where I should report this and if so, I hope I've provided enough relevant information.
Invoke the following cmdlet:
Get-WinUserLanguageList
Windows PowerShell 5.1 on the same machine returns details of the language list for the current user account:
> Get-WinUserLanguageList -Verbose
LanguageTag : en-IE
Autonym : English (Ireland)
EnglishName : English
LocalizedName : English (Ireland)
ScriptName : Latin
InputMethodTips : {1809:00000809, 1809:00001809}
Spellchecking : True
Handwriting : False
> Get-WinUserLanguageList -Debug
Get-WinUserLanguageList: Cannot marshal 'parameter #2': Invalid managed/unmanaged type combination.
> $PSVersionTable
Name Value
---- -----
PSVersion 7.1.0-rc.2
PSEdition Core
GitCommitId 7.1.0-rc.2
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
> Get-Command Get-WinUserLanguageList
CommandType Name Version Source
----------- ---- ------- ------
Cmdlet Get-WinUserLanguageList 2.0.0.0 International
> (Get-Command Get-WinUserLanguageList).Source | Get-Module | Format-List -Property *
LogPipelineExecutionDetails : False
Name : International
Path : C:\Windows\system32\WindowsPowerShell\v1.0\Modules\International\International.psd1
ImplementingAssembly :
Definition :
Description :
Guid : 561544e6-3a83-4d24-b140-78ad771eaf10
HelpInfoUri : https://go.microsoft.com/fwlink/?linkid=285548
ModuleBase : C:\Windows\system32\WindowsPowerShell\v1.0\Modules\International
PrivateData :
ExperimentalFeatures : {}
Tags : {}
ProjectUri :
IconUri :
LicenseUri :
ReleaseNotes :
RepositorySourceLocation :
Version : 2.0.0.0
ModuleType : Manifest
Author : Microsoft Corporation
AccessMode : ReadWrite
ClrVersion : 4.0
CompanyName : Microsoft Corporation
Copyright : 漏 Microsoft Corporation. All rights reserved.
DotNetFrameworkVersion :
ExportedFunctions : {}
Prefix :
ExportedCmdlets : {[Get-WinAcceptLanguageFromLanguageListOptOut, Get-WinAcceptLanguageFromLanguageListOptOut], [Get-WinCultureFromLanguageListOptOut, Get-WinCultureFromLanguageListOptOut],
[Get-WinDefaultInputMethodOverride, Get-WinDefaultInputMethodOverride], [Get-WinHomeLocation, Get-WinHomeLocation]鈥
ExportedCommands : {[Get-WinAcceptLanguageFromLanguageListOptOut, Get-WinAcceptLanguageFromLanguageListOptOut], [Get-WinCultureFromLanguageListOptOut, Get-WinCultureFromLanguageListOptOut],
[Get-WinDefaultInputMethodOverride, Get-WinDefaultInputMethodOverride], [Get-WinHomeLocation, Get-WinHomeLocation]鈥
FileList : {}
CompatiblePSEditions : {Core, Desktop}
ModuleList : {}
NestedModules : {Microsoft.InternationalSettings.Commands}
PowerShellHostName :
PowerShellHostVersion :
PowerShellVersion : 5.1
ProcessorArchitecture : None
Scripts : {}
RequiredAssemblies : {}
RequiredModules : {}
RootModule :
ExportedVariables : {}
ExportedAliases : {}
ExportedDscResources : {}
SessionState : System.Management.Automation.SessionState
OnRemove :
ExportedFormatFiles : {}
ExportedTypeFiles : {}
You can import Windows PowerShell module in WindowsPowerShell mode which is available as a parameter for Import-Module cmdlet.
Import-Module -Name International -UseWindowsPowerShell -Verbose
@anthony-geoghegan The module is not in the repository. We could use Windows Feedback tool to report the issue.
/cc @anmenaga for information.
WHY doesn't PowerShell 7.1 recognise this module as not working natively? While I get that the team behind the module hasn't bothered to port to 7.x, shouldn't PowerShell force this module to use the compatibility solution.
It feels like compatibility is not a top issue going forward.
I really don't understand....sorry...i just would like to get twrp to my mate 10 pro (bla-l29). I don't know how this TomTom get here
Thanks, @kvprasoon I wasn't aware of the -UseWindowsPowerShell option or Windows PowerShell Compatibility
@iSazonov I鈥檝e used the Feedback Hub (that comes with Windows 10) to report this problem, under the Input and Language category, including a link to this GitHub issue.
This issue has been marked as external and has not had any activity for 1 day. It has been be closed for housekeeping purposes.