Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Facebook Twitter Instagram
Tech News Today
  • Hardware
    • Motherboards
    • CPUs
    • Graphic Cards
    • RAM
    • SSDs
    • Computer Cases
    • Monitors
    • Peripherals
    • Power Supply Unit
    • PC Builds
    • Computer Tips
  • Software
  • Operating System
    • Windows
    • Mac
    • Linux
  • Gaming
  • Mobile
  • Console
  • More
    • Internet
    • Networking
    • Security
    • Buyer’s Guide
    • Gadgets
    • Laptops
    • Reviews
    • How To
    • News
Tech News Today
Home»Windows»How To Fix PowerShell Not Working

How To Fix PowerShell Not Working

Anup ThapaBy Anup ThapaJuly 9, 2022
powershell not working

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.

Table of Contents

  • Why Is PowerShell Not Working?
  • How to Fix PowerShell Not Working?
    • Restart PC (Special Case)
    • Enable PowerShell via Windows Features
    • Modify Group Policy and Registry
    • Modify Execution Policy
    • Update / Reinstall PowerShell Framework
    • Try Using Different Account
    • Perform a Clean Boot
    • Use System Repair Utilities
    • Update Windows
  • How to Fix PowerShell Modules Not Working?

Why Is PowerShell Not Working?

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

How to Fix PowerShell Not Working?

Before you start troubleshooting, we recommend running PowerShell as administrator from the following location:
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe.
Replace system32 with syswow64 for the x86 version.

For minor errors such as Access Is Denied, the item you selected is unavailable, or this file does not have an app associated with it for performing this action, this could be all that’s needed to fix the issue.

Restart PC (Special Case)

Note: This fix only applies to Windows 10 S.

After an in-place upgrade of Windows 10 S, you may encounter the Your organization used Device Guard to block this app error when launching PowerShell.

This error occurs because of a policy that prevents Windows 10 S from controlling Win32 apps. This restriction should normally be cleared during the upgrade, but in case it’s not, you can clear it by restarting the PC a few times.

Enable PowerShell via Windows Features

You may be facing issues with PowerShell because it’s disabled in the Windows Features utility. Here’s how you can enable PowerShell in such cases:

  1. Press Win + R, type optionalfeatures, and press Enter.
  2. Make sure the box next to Windows PowerShell is checked to enable it, and press OK.
    windows-features-windows-powershell-2.0

Modify Group Policy and Registry

Misconfigured group policy settings could also be the reason why PowerShell isn’t working. For instance, users have encountered error messages such as “This operation has been canceled due to restrictions in effect on this computer. Please contact your system administrator.”

Here’s what you can do to check if this is the issue:

  1. Press Win + R, type gpedit.msc, and press Enter.
  2. Navigate to User Configuration > Administrative Templates > System.
  3. Double-click the Don’t run specified Windows applications policy and set it to Not configured, and press OK.
    don't-run-specified-windows-applications
  4. Restart your PC and test if PowerShell works properly now.

Modify Execution Policy

When attempting to run a script that isn’t digitally signed, you may face errors due to the execution policy. We have a detailed article on changing the execution policy for your further reading, but here are the main steps:

  1. Press Win + R, type powershell, and press CTRL + Shift + Enter.
  2. Execute the following command:
    Set-ExecutionPolicy RemoteSigned -Force -Scope LocalMachine
    set-execution-policy-powershell
  3. Do note that you have to change the set execution policy separately for the 32-bit and 64-bit versions.

Update / Reinstall PowerShell Framework

Another reason for errors in PowerShell is that the PowerShell files, commonly the module store for instance is corrupted. In such scenarios, you can execute the following command to update the PowerShell framework:

iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI"

update-powershell

If PowerShell isn’t launching at all or something similar, you can take the following steps instead to update/reinstall it via the GUI instead:

  1. Download the x64 version or x86 version as appropriate for your system.
  2. Launch the PowerShell Installer and follow the on-screen instructions.
  3. If you’d like to install a different PowerShell version, you can find all the releases on the PowerShell GitHub page.

Try Using Different Account

Although uncommon, misconfigured settings and other issues with the current user account you’re on could also be preventing PowerShell from working properly. In such cases, users have had success with switching to a different user account.

We recommend enabling the default administrator account to check if this is indeed the problem in your case. Here are the steps to do so:

  1. If Command Prompt works, execute the following command in CMD and skip ahead to Step 5.
    net user administrator /active:yes
    Net-User-Administrator
  2. Alternatively, press Win + R, type lusrmgr.msc, and press Enter.
  3. Open Users and double-click Adminstrator.
  4. Uncheck the Account Is Disabled option and press OK.
    account is disabled administrator properties
  5. The admin account should be accessible now. Log into it and test if PowerShell works. If it does, the issue is with the previous account. You can try the solutions listed below to fix the corrupt account. If that doesn’t work, you’ll ultimately need to backup your user files and migrate to a new account.

Perform a Clean Boot

Background conflicts with third-party apps (usually antiviruses), or even some Microsoft services could be the reason why PowerShell isn’t working. To test this, you can clean boot with only the core services and check if PowerShell works then. Here are the steps to do so:

  1. Press CTRL + Shift + Esc and switch to the Startup tab in the Task Manager.
  2. Disable all unnecessary startup programs, especially ones that you suspect might be causing the issue.
    task manager startup items
  3. Press Win + R, type msconfig, and press Enter.
  4. Switch to the Services tab and enable the Hide all Microsoft services checkbox.
    hide all ms drivers
  5. Click on Disable All and press OK.
  6. Restart your PC and test if PowerShell works now.
  7. If it works, you can enable the service that you think is causing the issue, restart, and check if it being enabled affects PowerShell. By repeating this process, you can eventually figure out the culprit.
  8. If PowerShell doesn’t work despite clean booting, the issue is likely something else. In this case, repeat Steps 3 – 5 but enable the services this time to resume booting normally.

Use System Repair Utilities

As stated, file corruption is a common reason for such issues in Windows, and PowerShell is no exception. We recommend using the CHKDSK, SFC, and DISM utilities to scan for and repair any corruption. Here’s how you can do so:

  1. Press Win + R, type cmd and press CTRL + Shift + Enter.
  2. Type chkdsk C: /f /x /r and press Enter.
    running-chkdsk-command1
  3. If CheckDisk reports any issues, you can troubleshoot for that specific problem. Otherwise, execute the following commands next:
    DISM /Online /Cleanup-Image /Restorehealth
    Sfc /Scannow

    dism sfc

If Command Prompt isn’t working either, you can boot into safe mode and try using the aforementioned utilities there.

Update Windows

There have been multiple cases in the past where various Windows components including PowerShell stopped working after an update. Numerous users faced this particular issue after an antimalware update, for instance.

Problems like this get patched pretty soon, so if you encountered this issue after an update, the best thing to do is to install the new update when it comes out. Automatic Updates are enabled on most PCs, but just in case, here’s how you can do so manually:

  1. Press Win + I and select Windows Update.
  2. Press the Check for Updates button. Download and install the update if available.
    check for updates

How to Fix PowerShell Modules Not Working?

PowerShell modules are located in the following directories:
C:\Program Files\WindowsPowerShell\Modules C:\Windows\System32\WindowsPowerShell\v1.0\Modules

Most often, the files in these directories get corrupted which leads to issues with the modules. If a specific module is not working in PowerShell, updating or reinstalling it fixes the issue in most cases. Here’s how you can do so:

  1. Press Win + R, type powershell, and press CTRL + Shift + Enter.
  2. Type Get-Module -ListAvailable and note the name of the module you’re trying to update or reinstall.
    get-module-listavailable
  3. To update the module, execute the following command:
    Update-Module -Name ModuleName
    update-module-smbshare
  4. To uninstall the module, execute the following commands:
    Uninstall-Module -Name ModuleName
    Install-Module -Name ModuleName

    install-module-smbshare
fix
Anup Thapa
  • LinkedIn

Anup Thapa is a tech writer at TechNewsToday. He mostly writes informative articles, tutorials, and troubleshooting guides related to Windows systems, networking, and computer hardware. Anup has been writing professionally for almost 5 years, and tinkering with PCs for much longer. His love for all things tech started when he got his first PC over 15 years ago. It was a Pentium IV system running Windows XP on a single 256 MB stick. He spent his formative years glued to this PC, troubleshooting any hardware or software problems he encountered by himself. Professionally, Anup has had brief forays into a variety of fields like coding, hardware installation, writing, etc. In doing so, he's worked with people of different backgrounds and skill levels, from average joes to industry leaders and experts. This has given him not just a versatile skillset, but also a unique perspective for writing that enables him to concisely communicate complex information and solve his reader's problems efficiently. You can contact him at anup@technewstoday.com

Related Posts

amd-software-not-opening

How to Fix AMD Software Not Opening

March 3, 2023
how to create a folder

7 Ways to Create a Folder on Windows

March 3, 2023
turn off automatic updates windows

How to Turn Off Automatic Updates on Windows

March 2, 2023
Memory-Compression

What is Memory Compression in Windows? Should You Enable or Disable It

March 1, 2023
dism-vs-sfc-vs-chdsk

DISM, SFC, CHKDSK: What’s the Difference

February 28, 2023
how-to-open-exe-file

4 Ways to Open EXE File

March 2, 2023
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
Memory-Compression

What is Memory Compression in Windows? Should You Enable or Disable It

March 1, 2023
dism-vs-sfc-vs-chdsk

DISM, SFC, CHKDSK: What’s the Difference

February 28, 2023
bios-settings-for-gaming

Best BIOS Settings for Gaming

February 16, 2023
You may also like
how-to-clean-hp-printer-rollers

How to Clean HP Printer Rollers

March 3, 2023
keyboard input lag

9 Ways to Fix Keyboard Input Lag

March 3, 2023
keyboard key is stuck

How to Fix a Stuck Key on a Keyboard

March 3, 2023
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

November 10, 2022
Facebook Twitter Pinterest
  • Home
  • About Us
  • Our Team
  • Editorial Guidelines
  • Privacy Policy
  • Affiliate Disclosure
© 2023 TechNewsToday, editor@technewstoday.com | Tech Central Pvt. Ltd.

Type above and press Enter to search. Press Esc to cancel.