If you see “Windows PowerShell has stopped working” on Windows 10, the fix usually involves repairing the .NET Framework, clearing a corrupted PowerShell profile, or running the built-in System File Checker. Below are the exact steps to resolve the crash, plus what causes it and how to prevent it from coming back.
Why PowerShell Crashes on Windows 10
PowerShell is a Microsoft scripting and automation tool built into Windows 10. It relies on the .NET Framework, on your user profile’s configuration files, and on the integrity of Windows system files. When any of those get corrupted or outdated, PowerShell can crash on launch, during a command, or when you close it.
Common causes include:
- A corrupted or incompatible PowerShell profile (a script that runs each time PowerShell starts)
- Damaged .NET Framework installation or missing updates
- System file corruption from a failed Windows update or disk errors
- Third-party security software interfering with PowerShell execution
- An outdated Windows 10 version that has a known PowerShell bug
Quick Fix: Run PowerShell as Administrator and Repair .NET
Start with the simplest fix that addresses the most common cause: a broken .NET Framework. Windows 10 ships with .NET Framework 4.8, but updates and repairs are managed through Windows Update and the .NET Framework Repair Tool.
- Press Windows + R, type
optionalfeatures, and press Enter. - Find “.NET Framework 4.8 Advanced Services”, expand it, and make sure the checkboxes are enabled.
- Click OK and restart if prompted.
- Open Windows Update (Settings > Update & Security > Windows Update) and install all pending updates.
- If the crash persists, download the “Microsoft .NET Framework Repair Tool” from the official Microsoft website and run it. It will detect and fix common .NET issues automatically.
Fix Corrupted PowerShell Profile
Your PowerShell profile is a script that loads every time you start PowerShell. If it contains an error or references a missing module, PowerShell can crash immediately. To test, temporarily bypass the profile:
- Open a command prompt (not PowerShell) by pressing Windows + R, typing
cmd, and pressing Enter. - Type
powershell -NoProfileand press Enter. - If PowerShell opens without crashing, the problem is your profile. Rename it to back it up:
In PowerShell (with -NoProfile), run:
Rename-Item $PROFILE $PROFILE.bak
Then close and reopen PowerShell normally. If it works, your old profile was the issue. You can inspect the .bak file for problematic lines or start fresh.
Run System File Checker and DISM
Windows 10 includes two command-line tools that repair corrupted system files. Run them in order:
- Open Command Prompt as administrator (right-click Start > Command Prompt (Admin) or Windows PowerShell (Admin)).
- Type
sfc /scannowand press Enter. Wait for the scan to finish (it can take 15-20 minutes). - If SFC finds issues but can’t fix them, run
DISM /Online /Cleanup-Image /RestoreHealthand press Enter. - Restart your computer and test PowerShell again.
These tools compare your system files against known-good versions and replace any that are corrupted or missing. They don’t affect your personal files.
Check for Third-Party Interference
Antivirus or security software can sometimes block PowerShell because it’s used by legitimate scripts and also by malware. If the crash started after installing new security software, test by temporarily disabling it (not uninstalling) and launching PowerShell. If it works, add PowerShell to the software’s whitelist or contact the vendor for guidance.
Also, some system optimization tools or “cleaner” apps can delete PowerShell registry keys or break its dependencies. If you recently ran one, consider restoring from a system restore point (if available) or reinstalling PowerShell via Windows Features.
Reinstall or Reset PowerShell
If nothing else works, you can reinstall PowerShell itself. In Windows 10, PowerShell is a Windows feature, not a separate app, so you can’t uninstall it like a normal program. But you can disable and re-enable it:
- Open Control Panel > Programs > Turn Windows features on or off.
- Find “Windows PowerShell 2.0” (if present) and uncheck it. Leave “Windows PowerShell 5.1” checked.
- Click OK, restart, then go back and re-check the 2.0 option if you need it.
For a more modern approach, you can install PowerShell 7 (the current version) from the Microsoft Store or GitHub. It runs side-by-side with the built-in 5.1 and often avoids the crash because it uses a different profile and .NET Core runtime.
Update Windows 10
Microsoft periodically fixes PowerShell crashes through cumulative updates. If you’re on an older build, the bug may already be patched. Go to Settings > Update & Security > Windows Update and click “Check for updates”. Install all updates, including optional ones, and restart. After updating, test PowerShell again.
If you have a specific error code (like 0x80070002 or 0x800F0922), search for it on Microsoft’s official support site — those codes often point to a specific missing update or component.
Frequently Asked Questions
Will I lose my scripts if I reset PowerShell?
No. Resetting or reinstalling PowerShell doesn’t delete your scripts or modules. It only affects the program itself. Your personal profile might be renamed (as shown above), but your .ps1 files remain untouched.
Why does PowerShell crash only when I run a specific command?
That usually means the command or a module it loads is incompatible with your PowerShell version or .NET Framework. Try running the command in a clean session with powershell -NoProfile. If it works, the issue is your profile. If not, the command or module itself is broken.
Can I use Command Prompt instead of PowerShell?
Yes, for basic tasks. Command Prompt can run most everyday commands, but PowerShell is required for advanced scripting, automation, and many modern Windows management tasks. If PowerShell is completely broken, you can still use Command Prompt for file operations and system tools.
Is it safe to delete the PowerShell profile?
Yes. The profile is just a script that runs at startup. Deleting it (or renaming it) only removes your custom aliases, functions, and settings. You can recreate them later. It won’t harm your system or your files.
Does Windows 10 have a built-in repair for PowerShell?
Not directly. But the System File Checker (sfc /scannow) and DISM tool repair system files that PowerShell depends on. Also, the .NET Framework Repair Tool fixes the runtime that PowerShell uses. Running both is the closest thing to a built-in repair.
What if PowerShell still crashes after all these steps?
If you’ve tried every fix and the problem persists, consider creating a new Windows user account. A corrupted user profile can cause PowerShell to crash even when the system files are fine. If that works, migrate your files to the new account. As a last resort, use Windows 10’s “Reset this PC” option (keep your files) to reinstall Windows while preserving your data.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- How to Adjust Volume Levels on a Windows PC
- Reset Chrome Sync to Fix Problems
- Fix Mouse Not Working in Windows 11
- Fix Windows Defender Failed to Initialize Error
- Change Google Text-to-Speech Voice on Android
- How to Hide or Unhide NFTs on OpenSea Profile