Set-Culture为在本地使用的持久性新ps会话设置文化
Set-Culture -CultureInfo de-DE
...但是在远程执行时会默默失败,例如:
$secPassword = ConvertTo-SecureString yourSecret -AsPlainText -Force
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $ENV:COMPUTERNAME\YourUsername, $secPassword
$session = new-pssession -computername localhost -credential $cred
invoke-command -command { Set-Culture -CultureInfo de-DE } -Session $session
我在这里想念什么?