PowerShell Not Starting in ConEmu on Windows 10: Troubleshooting Guide
If you are a Windows 10 user who has been using ConEmu as your preferred console emulator, you might have encountered an issue where PowerShell does not start when you try to launch it using the command powershell.exe in the CMD.exe console in ConEmu. This article will provide a troubleshooting guide to help you resolve this issue.
Checking ConEmu Settings
The first step in troubleshooting this issue is to check the settings in ConEmu. Here are the steps to follow:
- Launch ConEmu and click on the settings icon (a gear icon) on the top right corner.
- In the settings window, click on the "Startup" tab.
- Under the "Task" section, ensure that the command for PowerShell is set to
powershell.exe. - Save the settings and restart ConEmu.
Checking PowerShell Execution Policy
The next step is to check the execution policy for PowerShell. The execution policy determines whether a script can be run or not. Here are the steps to follow:
- Launch PowerShell outside of ConEmu (you can search for "PowerShell" in the start menu and launch it).
- Type the command
Get-ExecutionPolicyand press Enter. - If the execution policy is set to "Restricted", change it to "RemoteSigned" or "Unrestricted" using the command
Set-ExecutionPolicy -ExecutionPolicy RemoteSignedorSet-ExecutionPolicy -ExecutionPolicy Unrestricted, respectively. Note that changing the execution policy to "Unrestricted" can pose a security risk, so use it with caution.
Checking Environment Variables
The third step is to check the environment variables in your system. Here are the steps to follow:
- Launch ConEmu and type the command
setin theCMD.execonsole. - Look for the "Path" variable and ensure that the path to the PowerShell executable (usually
C:\Windows\System32\WindowsPowerShell\v1.0) is included. - If it is not included, add it to the "Path" variable using the command
setx Path "%Path%;C:\Windows\System32\WindowsPowerShell\v1.0".
Checking PowerShell Version
The fourth step is to check the version of PowerShell installed on your system. Here are the steps to follow:
- Launch PowerShell outside of ConEmu and type the command
$PSVersionTable.PSVersion. - Ensure that the version is 5.1 or later.
- If it is not, you might need to update PowerShell to the latest version.
Reinstalling ConEmu
If none of the above steps work, you might need to reinstall ConEmu. Here are the steps to follow:
- Uninstall ConEmu from the Control Panel.
- Download the latest version of ConEmu from the official website.
- Install ConEmu and launch it.
- Launch PowerShell from ConEmu using the command
powershell.exein theCMD.execonsole.
- Check ConEmu settings to ensure that the command for PowerShell is set to
powershell.exe. - Check PowerShell execution policy and change it to "RemoteSigned" or "Unrestricted" if it is set to "Restricted".
- Check environment variables and ensure that the path to the PowerShell executable is included in the "Path" variable.
- Check PowerShell version and update it to the latest version if it is not 5.1 or later.
- Reinstall ConEmu as a last resort.