【发布时间】:2014-04-01 22:03:51
【问题描述】:
我最近在我的 powershell 脚本中与文化相关的返回值遇到了一些问题。相同的脚本返回不同的值,具体取决于它是哪台机器。 所以我认为可能文化设置不同,并且对于一台服务器它返回了。
get-culture : de-DE
对于另一个来说就像:en-US
一个值用于键盘设置,但另一个(第二个)代表什么?
第二个值是绑定到操作系统安装还是只是一个设置? powershell中是否有更改值的命令?
当然我是先看gelpget-help get-culture
DESCRIPTION
The Get-Culture cmdlet gets information about the current culture settings. This includes information about the
current language settings on the system, such as the keyboard layout, and the display format of items such as
numbers, currency, and dates.
但我对此并不满意。
【问题讨论】:
-
我只看到一个字段被返回,名称。 de-DE 是德语德语(相对于奥地利语或瑞士德语)。 en-US 是美国英语。目前还不清楚你到底在问什么。显然,国际模块中有一个 Set-Culture cmdlet。
-
所以,问另一种方式。是否可以将其设置为 de-US ?我认为第一个代码用于键盘布局,第二个代码可能用于系统内部设置。
标签: powershell powershell-3.0 windows-server-2012 cultureinfo culture