Hello every today I am going to be sharing a PowerShell script that I wrote that works that will allow you to enable
Windows Sandbox and HyperV without restarting your pc.
1. Open PowerShell as admin you can also do Windows key +r PowerShell.exe or Windows key +x then select PowerShell
2. Once you are in PowerShell paste the following script into your console you can ctrl +a then ctrl +v this and hit enter then you are done enjoy.
Hope this helps have fun and stay safe.
Windows Sandbox and HyperV without restarting your pc.
1. Open PowerShell as admin you can also do Windows key +r PowerShell.exe or Windows key +x then select PowerShell
2. Once you are in PowerShell paste the following script into your console you can ctrl +a then ctrl +v this and hit enter then you are done enjoy.
Code
# Check if running as Administrator
if (-not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Host "This script needs to be run as Administrator." -ForegroundColor Red
exit
}
# Enable Windows Sandbox
Write-Host "Enabling Windows Sandbox feature..." -ForegroundColor Green
Enable-WindowsOptionalFeature -FeatureName "Containers-DisposableClientVM" -All -NoRestart -Online
# Enable Hyper-V (required for Windows Sandbox)
Write-Host "Enabling Hyper-V feature..." -ForegroundColor Green
Enable-WindowsOptionalFeature -FeatureName "Microsoft-Hyper-V-All" -All -NoRestart -Online
# Enable Virtual Machine Platform (required for Windows Sandbox)
Write-Host "Enabling Virtual Machine Platform..." -ForegroundColor Green
Enable-WindowsOptionalFeature -FeatureName "VirtualMachinePlatform" -All -NoRestart -Online
Write-Host "Made By ClumsyLulz / SleepTheGod"
Write-Host "Windows Sandbox and related features have been enabled. You may need to manually restart your computer for changes to fully take effect." -ForegroundColor YellowHope this helps have fun and stay safe.
Hackerone.com/DBMS
Bugcrowd.com/Sleep
[email protected]
Youtube.com/Stripped
Github.com/SleepTheGod
Contact : linkedin.com/in/clumsy/
Contact : T.me/SleepTheGod
Bugcrowd.com/Sleep
[email protected]
Youtube.com/Stripped
Github.com/SleepTheGod
Contact : linkedin.com/in/clumsy/
Contact : T.me/SleepTheGod


