How to fix PowerShell not working on Windows
In addition to system management and administration, PowerShell is often used to troubleshoot various issues in Windows. But if PowerShell itself isn’t working properly, troubleshooting can be a handful.
Generally speaking, most PowerShell issues occur due to misconfigured settings. Problems with specific modules are also very common, mostly due to a corrupt module store.
In this article, we’ve listed step-by-step instructions for resolving these and more PowerShell issues
Here are the most common reasons that prevent PowerShell from working properly:
- No admin privileges
- PowerShell is disabled
- Misconfigured group policies
- Corrupt PowerShell files
- Misconfigured / corrupt user account
- Background service conflict
- Buggy Windows version
Method 1: Restart your server/computer
Sometimes, a simple restart can fix temporary glitches or conflicts that cause PowerShell to stop working
Method 2: Run update Windows
Make sure your Windows operating system is up to date with the latest patches and updates. Microsoft often releases bug fixes and improvements that can resolve known issues
How to run update Windows Server
Method 3: Enable Windows PowerShell Script
You can enable the execution of the PowerShell script on Windows in two different methods. Follow the below-mentioned steps to enable it.
1. Using the Local Group Policy Editor
Step 1: In the Windows Search box, type ” gpedit.msc” and press Enter
Step 2: Navigate to User Configuration -> Administrative Templates -> System
Step 3: Double-click the Don’t run specified Windows applications policy and set it to “Not configured” or “Disabled” in the top-left corner. Finally, press Apply and then press OK
Step 4: Restart your PC and test if PowerShell works properly now
2. Using the Registry Editor
Step 1: In the Windows Search box, type “regedit” and press Enter
Step 2: Navigate to the following path: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
From the left-hand side right-click on the Windows and choose New > Key. And name the new registry key as PowerShell
Step 3: Click on the PowerShell key and from the Left-hand side Right-click on the empty area and choose New > DWORD (32-bit) Value. And Name the DWORD as EnableScripts.
Right-click on the newly created DWORD and choose Modify, and set the Value 0 – 1.
Step 4: Now again right-click on an empty area and choose New > String Value. And Name the String Value as ExecutionPolicy.
And Right click on Newly Created String value and choose modify and enter the value as mentioned below.
- AllSigned: Allow only Singed scripts
- RemoteSigned: Allow local scripts and remote signed scripts
- Unrestricted: Allow all scripts Click on Ok and Restart the system once.
Method 4: Perform an SFC Scan
Step 1: In the Windows Search box, select the Command Prompt app. Right-click it, then click Run as administrator. Command Prompt will open with administrator permissions
image
Step 2: Type the command below and hit Enter.
sfc /scannow
DISM /Online /Cleanup-Image /ScanHealth
DISM /Online /Cleanup-Image /RestoreHealth
Step 3: Wait for the scan process to complete and fix any issues if present.
> Then, restart your computer and check again
Check if the problem with PowerShell is fixed.
. Good Luck!