Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

PowerShell Has Stopped Working: Fixes That Work

· 5 min read · Home Tech

In this article
  1. Why PowerShell Crashes
  2. Quick Fixes to Try First
  3. Clear or Reset the PowerShell Profile
  4. Repair Windows PowerShell via DISM and SFC
  5. Reinstall or Update PowerShell
  6. Check for Conflicting Software
  7. Create a New User Profile
  8. Frequently Asked Questions

If you're seeing “PowerShell has stopped working” or “Windows PowerShell has stopped working” on Windows 10 or 11, the fix usually involves clearing a corrupted profile, repairing the Windows PowerShell module, or running the System File Checker. Below are the most reliable solutions, from quickest to most thorough, plus why this error happens in the first place.

Why PowerShell Crashes

PowerShell is a command-line shell and scripting language built on the .NET Framework (Windows PowerShell 5.1) or .NET (PowerShell 7+). The “stopped working” dialog typically appears when the process encounters an unhandled exception, a missing or corrupted DLL, or a conflict with a third-party add-on. Common triggers include:

  • Corrupted user profile – PowerShell stores settings in %APPDATA%\Microsoft\Windows\PowerShell and %USERPROFILE%\Documents\WindowsPowerShell. A damaged profile can crash the console on startup.
  • Outdated or broken .NET Framework – Windows PowerShell 5.1 depends on .NET Framework 4.5 or later. If the framework is corrupted, PowerShell may fail.
  • Conflicting modules or scripts – A module that loads automatically (e.g., in your $PROFILE) might throw an error that crashes the host.
  • Malware or antivirus interference – Some security software hooks into PowerShell to monitor commands, which can sometimes cause instability.
  • System file corruption – Damaged Windows system files can affect PowerShell's ability to start.

Quick Fixes to Try First

Before diving into deeper repairs, try these two simple steps. They resolve a surprising number of cases.

  1. Relaunch PowerShell as Administrator – Right-click the Start button, select “Windows PowerShell (Admin)” or “Terminal (Admin)”, and click Yes on the UAC prompt. If it opens, the issue may be permission-related.
  2. Restart your PC – A clean reboot clears temporary glitches and releases locked files. If the error persists after restart, move on to the next section.

Clear or Reset the PowerShell Profile

Your PowerShell profile is a script that runs every time you start a new session. If it contains a syntax error or a command that causes a crash, PowerShell may stop working immediately. To fix this:

  1. Open File Explorer and navigate to %USERPROFILE%\Documents\WindowsPowerShell (for Windows PowerShell 5.1) or %USERPROFILE%\Documents\PowerShell (for PowerShell 7).
  2. Look for a file named Microsoft.PowerShell_profile.ps1. Right-click it and choose “Rename”, then change the extension to .bak (e.g., Microsoft.PowerShell_profile.ps1.bak). This disables the profile without deleting it.
  3. Restart PowerShell. If it opens normally, the profile was the culprit. You can inspect the backup with Notepad to find the problematic line.

If you don't have a profile file, the crash is likely not profile-related. Proceed to the system-level repairs below.

Repair Windows PowerShell via DISM and SFC

Corrupted system files are a common cause of PowerShell crashes. Windows includes two built-in tools to fix them: DISM (Deployment Imaging Service and Management Tool) and SFC (System File Checker). Run them in this order:

  1. Open Command Prompt as Administrator (type “cmd” in the Start menu, right-click, and select “Run as administrator”).
  2. Run DISM /Online /Cleanup-Image /RestoreHealth. This repairs the Windows image. It may take 10–20 minutes. Do not close the window.
  3. After DISM finishes, run sfc /scannow. This scans and replaces corrupted system files. It can also take a while.
  4. Restart your PC and try PowerShell again.

If SFC finds files it cannot repair, run DISM again, then SFC once more. In most cases, this resolves the underlying corruption.

Reinstall or Update PowerShell

If the built-in Windows PowerShell 5.1 is crashing, you can reinstall it using the Windows optional features. For Windows 10 and 11:

  1. Go to Settings > Apps > Optional Features (Windows 11) or Settings > Apps > Apps & features > Optional features (Windows 10).
  2. Find “Windows PowerShell 5.1” in the list. If it's there, click it and select “Uninstall”.
  3. After uninstalling, click “Add a feature” (or “Add an optional feature”), search for “PowerShell”, and install it again.

Alternatively, you can install PowerShell 7 (the modern, cross-platform version) from the Microsoft Store or GitHub. It runs side-by-side with Windows PowerShell 5.1 and often avoids the issues that plague the older version. To install from the Store, search “PowerShell” in the Microsoft Store and click “Install”.

Check for Conflicting Software

Third-party programs that integrate with PowerShell can cause crashes. The most common culprits are antivirus suites, especially those with “script protection” or “behavior monitoring”. To test this, temporarily disable your antivirus (not Windows Defender) and try launching PowerShell. If it works, add PowerShell to the antivirus's exclusion list.

Another known conflict is with the PSReadLine module, which provides command-line editing. If you've customized it, reset it by deleting the PSReadLine history file (located at %APPDATA%\Microsoft\Windows\PowerShell\PSReadLine) or run Remove-Module PSReadLine in a session that does start (if you can get one).

Create a New User Profile

If none of the above works, the problem may be with your Windows user account. Creating a new local user account and testing PowerShell there can isolate the issue. To do this:

  1. Go to Settings > Accounts > Family & other users.
  2. Click “Add account” and choose “I don't have this person's sign-in information”, then “Add a user without a Microsoft account”.
  3. Create a new username and password.
  4. Log into the new account and try PowerShell.

If PowerShell works in the new account, your original profile is corrupted. You can migrate your files and settings, or continue using the new account.

Frequently Asked Questions

Why does PowerShell keep crashing on startup?

The most common reason is a corrupted profile script or a broken module that loads automatically. Clearing the profile (as described above) usually fixes it. If not, system file corruption or a .NET Framework issue is likely.

Can I replace Windows PowerShell 5.1 with PowerShell 7?

Yes, you can install PowerShell 7 alongside 5.1. They coexist without conflict. PowerShell 7 is the recommended version for new scripts, but some older scripts and cmdlets may not be compatible. You can set PowerShell 7 as the default terminal in Windows Terminal.

Does the error affect PowerShell scripts or just the console?

It can affect both. If the console crashes, scripts running in it will stop. However, if you run a script from Task Scheduler or another process, it may still execute because it doesn't use the interactive console. The fixes above address the console and the underlying runtime.

Is there a way to get more details about the crash?

Yes. Open the Windows Event Viewer (type “event viewer” in Start), go to Windows Logs > Application, and look for errors from “PowerShell” or “Windows PowerShell”. The error details often include the faulting module (e.g., clr.dll or powershell.exe) and an exception code, which can help you search for a specific fix.

Will resetting Windows fix PowerShell?

Resetting Windows (via Settings > System > Recovery > Reset this PC) will restore all system files and remove installed apps, which almost certainly fixes PowerShell. However, it's a last resort because you'll need to reinstall your software. Try the other steps first.