PowerShell - Set-Culture 似乎没有改变任何东西

PowerShell - Set-Culture doesn't seem to change anything

我有一个云服务 Web 角色,我需要 运行 打开一些 PowerShell 以确保服务器始终以正确的文化设置:en-AU。

这是因为 Microsoft 可以随时重置文化值。

当我运行:

Get-Culture

我得到:

1033             en-US            English (United States)

那么我运行:

Set-Culture en-AU

但我仍然得到:

1033             en-US            English (United States)

我尝试了很多东西,但似乎没有什么能真正改变这种文化。

任何帮助都会很棒。

根本原因是您没有运行使用管理员权限安装PowerShell。

Set-Culture 需要在系统上设置管理员权限。

只需 运行 您的 PowerShell 处于管理员模式,您的区域性将设置为新区域性,如下所示:

希望对您有所帮助!

就像petseral在上面的评论中所说:

Changing user locale does not affect already started PowerShell instances.
You have to start new PowerShell process.