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 : 148
    Win 10 Pro - 1903
       #1

    Thank you!
      My Computers


  2. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #2

      My Computers


  3. Posts : 55
    Win 10 64
       #3

    Thanks Sean! Going over our machines and disabling this old engine.

    - - - Updated - - -

    All,

    If I only run scripts in 7.X.X is it ok to disable 5.1 as well or is it needed for remoting in PS 7.X.X?
      My Computer


  4. Posts : 68,937
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #4

    XXLMandalorian said:
    Thanks Sean! Going over our machines and disabling this old engine.

    - - - Updated - - -

    All,

    If I only run scripts in 7.X.X is it ok to disable 5.1 as well or is it needed for remoting in PS 7.X.X?
    Hello,

    Considering 5.1 is built-in to the OS, it may be best to keep it to avoid any potential issues.
      My Computers


  5. Posts : 120
    Windows 10
       #5

    I am using a run_en.cmd to update my windows 8 cellphone to windows 10 and when I click to run the cmd I end up getting this "'powershell' is not recognized as an internal or external command, operable program or batch file.
    Error: You don't have powershell enabled, or you're using lite windows build."

    Please enable powershell and try again.

    I just checked and powershell is already enabled but for some odd reason it still won't work. So do you think the issue might be with the powershell setting or something or in the cmd I am trying to use?
      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 Discussions
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 04:54.
Find Us




Windows 10 Forums