修复运行 tasklist 命令时提示 ERROR: Not found

最近碰到了一个脚本运行 tasklist 总是提示 ERROR: Not found,在这里找到了修复的方法 https://superuser.com/questions/1282867/windows-8-1-tasklist-error-not-found

方法是在命令行运行以下命令

cd windowssystem32wbem
net stop winmgmt
rename Repository Repository.old
net start winmgmt
tasklist # long pause as it rebuilds

答案还提到这个链接 https://katyscode.wordpress.com/2007/02/03/tutorial-how-to-fix-wmi-corruption/ ,原来是 WMI corrupt 了,该文还提了很多其他修复方法,感谢答案的作者给出有效的部分。

原文地址:https://www.cnblogs.com/Diryboy/p/Fix-tasklist-ERROR-Not-found.html