When you start PowerShell or Command Prompt, the error code 0xc0000142 may appear. Any console tool, such as sfc.exe or dism.exe may throw the same error.
The application was unable to start correctly (0xc0000142). Click OK to close the application.

Cause
This happens if c:\windows\system32\conhost.exe is missing.
Error code 0xC0000142 (“STATUS_DLL_INIT_FAILED”) means “{DLL Initialization Failed} Initialization of the dynamic link library %hs failed. The process is terminating abnormally.”
This might happen if an antimalware program has deleted the file due to a false positive.
Resolution
To resolve the issue, you can do one of the following:
Option 1) Boot into Windows RE and run SFC offline with the logging option. See if it restores conhost.exe successfully. See How to Run System File Checker (SFC) Offline.
Option 2) Source conhost.exe from another computer running the same OS build number. You can check the OS build and version number by running winver.exe.
Option 3) You can also download Windows modules using the information in the article → How to Download Missing System files (dll, exe, sys) from Microsoft or extract it from the Windows ISO using 7-Zip.
After obtaining a fresh copy of conhost.exe, copy the file to C:\Windows\System32. If conhost.exe already exists (albeit corrupted) in that location, take ownership of that file using the “Security” tab in properties. Then, replace the file.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!