Enable or Disable Windows PowerShell 2.0 in Windows 10  

    Enable or Disable Windows PowerShell 2.0 in Windows 10

    Enable or Disable Windows PowerShell 2.0 in Windows 10

    How to Enable or Disable Windows PowerShell 2.0 in Windows 10
    Published by Category: Apps & Features
    07 Nov 2019
    Designer Media Ltd


    How to Enable or Disable Windows PowerShell 2.0 in Windows 10


    Windows PowerShell is a task-based command-line shell and scripting language designed especially for system administration. Built on the .NET Framework, Windows PowerShell helps IT professionals and power users control and automate the administration of the Windows operating system and applications that run on Windows.

    Windows 10 includes Windows PowerShell 5.0 by default that has some great new features that enhance security including enhanced transcription logging and AMSI protection.

    However, the Windows PowerShell 2.0 engine is still enabled and is now recognized as a security risk that can be used to run malicious scripts.

    While Windows PowerShell 2.0 has been deprecated starting with Windows 10 Fall Creators Update, it may still be enabled on your system.

    For more details about Windows PowerShell, see:

    This tutorial will show you how to enable or disable Windows PowerShell 2.0 for all users in Windows 10.

    You must be signed in as an administrator to enable or disable Windows PowerShell 2.0.



    Contents

    • Option One: Enable or Disable Windows PowerShell 2.0 in Windows Features
    • Option Two: Enable or Disable Windows PowerShell 2.0 in PowerShell
    • Option Three: Enable or Disable Windows PowerShell 2.0 in Command Prompt






    OPTION ONE

    Enable or Disable Windows PowerShell 2.0 in Windows Features


    1 Open the Control Panel (icons view), and click/tap on the Programs and Features icon.

    2 Click/tap on the Turn Windows features on or off link on the left side. (see screenshot below)

    Enable or Disable Windows PowerShell 2.0 in Windows 10-windows_features.jpg

    3 Check (enable - default) or uncheck the Windows PowerShell 2.0 box for what you want, and click/tap on OK. (see screenshots below)

    Enable or Disable Windows PowerShell 2.0 in Windows 10-powershell_2_windows_features-1.png Enable or Disable Windows PowerShell 2.0 in Windows 10-powershell_2_windows_features-2.png

    4 Click/tap on Close when it has finished. (see screenshot below)

    Enable or Disable Windows PowerShell 2.0 in Windows 10-powershell_2_windows_features-3.png

    5 You can now close Programs and Features if you like.






    OPTION TWO

    Enable or Disable Windows PowerShell 2.0 in PowerShell


    1 Open an elevated PowerShell.

    2 Do step 3 (check), step 4 (enable), or step 5 (disable) below for what you want to do.


     3. To Check Current State (Enabled or Disabled) of Windows PowerShell 2.0

    A) Copy and paste the command below into the elevated PowerShell, and press enter. (see screenshots below)

    Get-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2

    B) You will now see the current State show as Enabled or Disabled.

    Enable or Disable Windows PowerShell 2.0 in Windows 10-check_powershell_2_state-1.png Enable or Disable Windows PowerShell 2.0 in Windows 10-check_powershell_2_state-2.png


     4. To Enable Windows PowerShell 2.0

    This is the default setting.

    A) Copy and paste the command below into the elevated PowerShell, and press enter. (see screenshot below)

    Enable-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root

    Enable or Disable Windows PowerShell 2.0 in Windows 10-enable_powershell_2.jpg


     5. To Disable Windows PowerShell 2.0

    A) Copy and paste the command below into the elevated PowerShell, and press enter. (see screenshot below)

    Disable-WindowsOptionalFeature -Online -FeatureName MicrosoftWindowsPowerShellV2Root

    Enable or Disable Windows PowerShell 2.0 in Windows 10-disable_powershell_2.jpg

    6 You can now close the elevated PowerShell if you like.






    OPTION THREE

    Enable or Disable Windows PowerShell 2.0 in Command Prompt


    1 Open an elevated PowerShell.

    2 Do step 3 (check), step 4 (enable), or step 5 (disable) below for what you want to do.


     3. To Check Current State (Enabled or Disabled) of Windows PowerShell 2.0

    A) Copy and paste the command below into the elevated command prompt, and press enter. (see screenshots below)

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

    B) You will now see the current state show as Enabled or Disabled.

    Enable or Disable Windows PowerShell 2.0 in Windows 10-check_powershell_2_state_command-1.jpg Enable or Disable Windows PowerShell 2.0 in Windows 10-check_powershell_2_state_command-2.jpg


     4. To Enable Windows PowerShell 2.0

    This is the default setting.

    A) Copy and paste the command below into the elevated command prompt, and press enter. (see screenshot below)

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

    Enable or Disable Windows PowerShell 2.0 in Windows 10-enable_powershell_2_command.jpg


     5. To Disable Windows PowerShell 2.0

    A) Copy and paste the command below into the elevated command prompt, and press enter. (see screenshot below)

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

    Enable or Disable Windows PowerShell 2.0 in Windows 10-disable_powershell_2_command.jpg

    6 You can now close the elevated command prompt if you like.


    That's it,
    Shawn




  1. Posts : 135
    Win 10 Pro - 1903
       #1

    Thank you!
      My Computer

  2. Brink's Avatar
    Posts : 48,681
    64-bit Windows 10 Pro for Workstations build 19631
    Thread Starter
       #2

      My Computers


 

Tutorial Categories

Enable or Disable Windows PowerShell 2.0 in Windows 10 Tutorial Index Network & Sharing Instalation and Upgrade Browsers and Email General Tips Gaming Customization Apps and Features Virtualization BSOD System Security User Accounts Hardware and Drivers Updates and Activation Backup and Restore Performance and Maintenance Mixed Reality Phone


Related Threads
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 20:06.
Find Us




Windows 10 Forums