本文介绍了PowerShell-Set-Culture似乎没有任何改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有一个Cloud Service Web角色,我需要在该角色上运行一些PowerShell,以确保始终以正确的文化设置服务器:en-AU.

I have a Cloud Service Web Role that I need to run some PowerShell on to ensure the server is always setup in the right culture: en-AU.

其原因是Microsoft可以随时重置区域性值.

The reason for this is that Microsoft could, at anytime, reset the culture values.

当我跑步时:

Get-Culture

我得到:

1033             en-US            English (United States)

然后我运行:

Set-Culture en-AU

但我仍然得到:

1033             en-US            English (United States)

我尝试了很多事情,但是似乎并没有真正改变文化.

I have tried many things but nothing seems to really change the culture.

任何帮助都会很棒.

推荐答案

根本原因是因为您没有以 Administrator特权运行PowerShell.

The root cause is because you are not running the PowerShell with Administrator privilege.

Set-Culture需要在系统上设置管理员特权.

Set-Culture needs Administrator privilege to be set on the system.

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

Just run your PowerShell in Administrator mode and your culture will be set to the new one as below:

希望这会有所帮助!

这篇关于PowerShell-Set-Culture似乎没有任何改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 23:29