Hi Thérèse Fournier,
Thank you for reaching out to Microsoft Q&A forum. I understand how frustrating it is when PowerShell opens but then refuses every command.
Based on what you described, PowerShell itself is opening correctly, but something in the Windows environment (such as the terminal host, system path, or system files) may be preventing it from accepting commands properly.
I can see that Q&A Assist has already shared a few steps. If you’ve tried those and the issue persists, please try the additional steps below:
Step 1: Repair Windows system files
When PowerShell opens but refuses commands, it often points to corrupted or missing Windows system components. Repairing them can help restore normal functionality.
- Open the Start menu, search for Command Prompt
- Right‑click it and select Run as administrator
- In the Command Prompt window, run this command:
DISM /Online /Cleanup-Image /RestoreHealth - Please wait for the process to complete (it may pause at certain percentages—this is normal)
- Restart your PC once it finishes
This process is safe and won’t affect your personal files. It repairs Windows components that PowerShell depends on.
Step 2: Check that PowerShell is enabled in Windows Features
In some cases, PowerShell can be partially disabled at the system level.
- Press Windows + R, type optionalfeatures, then press Enter
- In the Windows Features window, make sure Windows PowerShell is checked
- If it’s unchecked, enable it and click OK
- Restart your PC and test PowerShell again
Step 3: Perform a clean boot to rule out software conflicts
Startup apps or security software can sometimes interfere with PowerShell.
- Press Windows + R, type msconfig, and press Enter
- Under the Services tab, check Hide all Microsoft services, then click Disable all
- Go to Startup > Open Task Manager, and disable startup items
- Restart your PC and test PowerShell
*Disclaimer: A "clean boot" starts Windows with a minimal set of drivers and startup programs. It helps to determine whether a background service is interfering with your game or program and to isolate the cause of a problem.
These steps of "clean boot" might look complicated at first glance. However, to avoid any trouble for you, please follow them in order and step-by-step so that it will help you get back on track.
If PowerShell works in a clean boot state, something running in the background is likely causing the issue.
Please let me know what happens after trying these steps, or if you see any specific error messages. I’ll be happy to continue helping you work through this.
If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.