How to Disable Windows PowerShell 2.0 on Windows 11 or 10?


With Windows PowerShell, IT professionals and power users can automate and control the Windows operating system and applications. AMSI protection and enhanced transcription logging are some excellent brand-new features with Windows PowerShell 5.0 by default, improving security.

Generally, PowerShell has different versions. As of writing this, PowerShell v5 is the latest. However, for compatibility reasons, Windows still has the old PowerShell 2.0 enabled. Being an older version, the PowerShell 2.0 is deprecated and even considered a security risk.

As such, unless you need PowerShell 2.0, it is recommended that you entirely disable it. This risewindows article will guide you on how to disable Windows PowerShell.

How to Disable Windows PowerShell 2.0 using Windows PowerShell?

To turn off Windows PowerShell 2.0 using Windows PowerShell, perform these steps:-

Step 1. First, open Windows PowerShell as an administrator.

Step 2. Then, type the following command to determine the current state of PowerShell 2.0:-

Get-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2

You do not need to do anything else if the State is Disabled. However, if it is Enabled, you need to enter the following command:-

Disable-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root

To re-enable Windows PowerShell 2.0 in the future, enter this command:-

Enable-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root

How to Turn Off Windows PowerShell 2.0 through Command Prompt?

To disable Windows PowerShell 2.0 using Command Prompt, use these steps:-

Step 1. First, open an elevated Command Prompt.

Step 2. Then. You can now check whether Windows PowerShell 2.0 is enabled on your PC by typing the following and hitting Enter:-

DISM /online /get-features /format:table | find "MicrosoftWindowsPowerShellV2Root"

So, the following commands can be used to disable PowerShell v2 if it is enabled:-

Dism /online /Disable-Feature /FeatureName:"MicrosoftWindowsPowerShellV2Root"

And, if you want to enable PowerShell 2.0, use this command instead:-

Dism /online /Enable-Feature /FeatureName:"MicrosoftWindowsPowerShellV2Root" -All

How to Disable Windows PowerShell V2 using Windows Features?

Here, Windows Features is an inbuilt utility that allows users to enable and disable specific features on Windows 11 and Windows 10; follow the above steps to disable the PowerShell:-

Step 1. First, click the Start button and type Windows Features.

Step 2. Now, click on Turn Windows features on or off.

Step 3. Then, remove the check from the Windows PowerShell 2.0 checkbox.

Step 4. After that, click the OK button and let the process finish.

Step 5. Lastly, restart your computer.

That’s it for the article.

You guys are amazing; keep reading, learning & growing.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.