Reputation: 11
I am unable to get the windows user language list using CMD line command.
I have used get-winuserlanguagelist
in PowerShell but I need its equivalent cmd command. For I face a troubleshooting issue on some PCs which are restricted by PowerShell policy.
Hence on those restricted PCs, I only have the CMD shell to solve this issue of being able to remove an extra language that user doesn't need.
Note: Also Region & Language settings are disabled according to policy permissions.
Upvotes: 1
Views: 2380
Reputation: 13570
The restriction only applies to the execution of scripts. It is not a real security measure, it's only there to prevent users from accidentally run PS scripts. Here are some of many ways to bypass the resrtiction without applying changes to the system:
-Command
parameter:
powershell -Command "Get-WinUserLanguageList"
You can pass multiple lines (aka a script) by separating the lines by ;
:
powershell -Command "Get-WinUserLanguageList; Write-Host 'Hello World!'"
stdin
:
echo Get-WinUserLanguageList | powershell
powershell -ExecutionPolicy Bypass -File .\my_script.ps1
Upvotes: 3
Reputation: 31686
If a computer is restricted from changing such things by policy, then its up to the admin of the network to run a PowerShell script at an elevated level to change such things.
Otherwise, allowing such changes means viruses could change the user experience for the worse.
The direction one should take is to create the PowerShell script, but one needs to run it at an admin level of authority.
Upvotes: 2