When you run PowerShell.exe, the PowerShell window may open and close immediately before you can read the error message. Running PowerShell.exe from an existing Command Prompt window, or opening PowerShell via Windows Terminal may show the error message:
The shell cannot be started. A failure occurred during initialization: The type initializer for 'System.Net.ServicePointManager' threw an exception. [process exited with code 4294901760 (0xffff0000)] You can now close this terminal with Ctrl+D, or press Enter to restart.
Some .NET apps may throw the following error:
Configuration parser error Error parsing C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config Parser returned error 0xC00CE556.
Cause
The above errors occur if the file machine.config is corrupt. This configuration file is presumably used by many .NET-based apps.
Resolution
To resolve the issue of the PowerShell window closing immediately after the launch and the Parser error 0xC00CE556, replace “Machine.Config” with a fresh copy using these steps.
- Open the following folder:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
Note: The folder path is mentioned in the error message above. Alternatively, you can find the correct folder name (version) by reading the “RuntimeVersion
” registry value in the following registry key:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\3\PowerShellEngine
-or-
- Open the folder “
C:\Windows\Microsoft.NET\
“ - Open the folder named “
Framework
” or “Framework64
” (depending upon your OS bitness). - Select specific version folder e.g., “
v4.0.30319
“ - Double-click the “
Config
” folder. - The “
Config
” folder will contain the files, “Machine.config
” and “Machine.config.default
“.
- Open the folder “
- In the above folder, delete the file named
machine.config
. - There should be another file named
machine.config.default
in that folder. Make a copy ofmachine.config.default
. - Name the copy as
machine.config
.
Using Command Prompt
If you wish to accomplish the above steps using Command Prompt or Batch files, here are the commands:
cd /d C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config
del machine.config
copy machine.config.default machine.config
That’s it! Open PowerShell. You should no longer get the error.
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!