Start-Job including custom cmdlet terminates with strange error

风格不统一 提交于 2019-12-01 22:22:12

I found a workaround on uservoice, did the trick for me

https://windowsserver.uservoice.com/forums/301869-powershell/suggestions/14915283-job-cmdlets-fail-with-utf-8-codepage

if (
    [Console]::InputEncoding -is [Text.UTF8Encoding] -and
    [Console]::InputEncoding.GetPreamble().Length -ne 0
) {
    [Console]::InputEncoding = New-Object Text.UTF8Encoding $false
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!