在windows 8.1和windows RT上面运行下面这段脚本:
$job = Start-Job -ScriptBlock { cmd /C 'echo y | D:\tools\tools\plink.exe -t -C -v -pw YourPassword -P 22 mosser@pstips.net "mkdir mossertest"' } $result = $job | Wait-Job |Receive-Job $result
出现下面的错误:
Program ‘cmd.exe’ failed to run: Object reference not set to an instance of an object
看到这篇文章的兄弟姐妹你们不用浪费时间了,这个问题是操作内部的bug,直接安装下面的热修复就可以解决:
知识库文章编号:3062960
语言:All (Global)
平台:x64
位置:(http://hotfixv4.microsoft.com/Windows%208.1/Windows%20Server%202012%20R2/sp1/Fix110370/9600/free/485206_intl_x64_zip.exe)
本文参考自:Sean Wheeler的 PowerShell error: NativeCommandFailed after installing KB3000850 — fixed! See KB3062960
本文链接: https://www.pstips.net/program-cmd-exe-failed-to-run-object-reference-not-set-to-an-instance-of-an-object.html
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!
请尊重原作者和编辑的辛勤劳动,欢迎转载,并注明出处!