Skip to content

Instantly share code, notes, and snippets.

@ghotz
Last active May 12, 2024 13:28
Show Gist options
  • Save ghotz/f6aacf6b218cb174755088931c4086b8 to your computer and use it in GitHub Desktop.
Save ghotz/f6aacf6b218cb174755088931c4086b8 to your computer and use it in GitHub Desktop.
Enable/disable common Windows Optional Features that enable/disable VBS
# Windows Sandbox
Disable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -Online -NoRestart
# WSL
Disable-WindowsOptionalFeature -FeatureName "VirtualMachinePlatform" -Online -NoRestart
Disable-WindowsOptionalFeature -FeatureName "Microsoft-Windows-Subsystem-Linux" -Online -NoRestart
# Hyper-V
Disable-WindowsOptionalFeature -FeatureName "Microsoft-Hyper-V-All" -Online -NoRestart
# Containers
Disable-WindowsOptionalFeature -FeatureName "Containers" -Online -NoRestart
# Windows Sandbox
Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -Online -NoRestart
# WSL
Enable-WindowsOptionalFeature -FeatureName "VirtualMachinePlatform" -Online -NoRestart
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Windows-Subsystem-Linux" -Online -NoRestart
# Hyper-V
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Hyper-V-All" -Online -NoRestart
# Containers
Enable-WindowsOptionalFeature -FeatureName "Containers" -Online -NoRestart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment