Skip to content

Instantly share code, notes, and snippets.

@TheKevinWang
Last active November 21, 2025 11:25
Show Gist options
  • Select an option

  • Save TheKevinWang/e3b703021f55f3b62cc7eb8deeb60fd3 to your computer and use it in GitHub Desktop.

Select an option

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