NewItemPropertyParams = @{ Path = "HKLM:\SOFTWARE\OpenSSH" Name = "DefaultShell" Value = "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" PropertyType = "String" Force = true } New-ItemProperty @NewItemPropertyParams
上述命令将远程ssh到Windows Server时的命令行由cmd改为PowerShell,使用体验更好。