Windows 8.1:任务列表:错误:未找到

Windows 8.1:任务列表:错误:未找到

当我运行时tasklist,出现此错误。

>tasklist
ERROR: Not found

>where tasklist
C:\Windows\System32\tasklist.exe

>tasklist /?

TASKLIST [/S system [/U username [/P [password]]]]
         [/M [module] | /SVC | /V] [/FI filter] [/FO format] [/NH]
...

>taskkill
ERROR: Invalid syntax. Neither /FI nor /PID nor /IM were specified.
Type "TASKKILL /?" for usage.

tasklist在提升的管理员 shell 中运行也会出现同样的错误。

我发现了这一点,但由于他们重新安装了整个系统,因此尚无定论,这似乎有点小题大做。

https://social.technet.microsoft.com/Forums/windowsserver/en-US/05ad8674-3846-46e6-a0cb-c289c14b9411/tasklist-error-not-found?forum=winservergen

我需要让这个命令正常工作才能使用显然依赖于它的 Heroku CLI。

我在 ServerFault 上发现了一个问题,并从管理员 shell 尝试了以下操作:

C:\Users\Chloe>winmgmt /salvagerepository
WMI repository salvage failed
Error code:  0x8007007E

C:\Users\Chloe>winmgmt /verifyrepository
WMI repository verification failed
Error code:  0x8007007E

C:\Users\Chloe>winmgmt /resetrepository
WMI repository reset failed
Error code:  0x8007007E

我使用 Console2 进行上述操作。这是运行 vanilla 管理员命令提示符时的输出。

C:\windows\system32>tasklist
ERROR: Not found

C:\windows\system32>Winmgmt /verifyrepository
WMI repository verification failed
Error code:     0x80041002
Facility:       WMI
Description:    Not found


C:\windows\system32>Winmgmt /salvagerepository
WMI repository verification failed
Error code:     0x80041002
Facility:       WMI
Description:    Not found


C:\windows\system32>Winmgmt /resetrepository
WMI repository reset failed
Error code:     0x8007041B
Facility:       Win32
Description:    A stop control has been sent to a service that other running services are dependent on.

如果我停下winmgmt来检查,它会说 OK,但是当我再次检查时,它会显示错误。

C:\Windows\System32\wbem>net stop winmgmt
The Windows Management Instrumentation service is stopping.
The Windows Management Instrumentation service was stopped successfully.


C:\Windows\System32\wbem>winmgmt /verifyrepository
WMI repository is consistent

C:\Windows\System32\wbem>winmgmt /verifyrepository
WMI repository verification failed
Error code:     0x80041002
Facility:       WMI
Description:    Not found

答案1

我用这个修复了它

cd \windows\system32\wbem
net stop winmgmt
rename Repository Repository.old
net start winmgmt
tasklist  # long pause as it rebuilds

某些应用程序可能安装了未自动重建的内容。要获取这些内容,请运行

for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s

参考:https://katyscode.wordpress.com/2007/02/03/tutorial-how-to-fix-wmi-corruption/

相关内容