Skip to content

Instantly share code, notes, and snippets.

@TheKevinWang
Last active January 20, 2020 18:54
Show Gist options
  • Save TheKevinWang/e3b703021f55f3b62cc7eb8deeb60fd3 to your computer and use it in GitHub Desktop.
Save TheKevinWang/e3b703021f55f3b62cc7eb8deeb60fd3 to your computer and use it in GitHub Desktop.
Enable and disable Powershell 2.0 via DISM
#Works on Windows 10 1803. Requires admin privileges.
#Disable Powershell 2.0 and 1.0
dism /online /disable-feature /FeatureName:MicrosoftWindowsPowerShellV2Root
dism /online /disable-feature /FeatureName:MicrosoftWindowsPowerShellV2
#Enable Powershell 2.0 and 1.0
dism /online /enable-feature /FeatureName:MicrosoftWindowsPowerShellV2Root
dism /online /enable-feature /FeatureName:MicrosoftWindowsPowerShellV2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment