Last active
May 12, 2026 12:43
-
-
Save Marshall-Hallenbeck/de943c948854c5b75f071475ee35699f to your computer and use it in GitHub Desktop.
NOT WORKING - Prevent Automatic Shutdown for Expired Windows Evaluation VMs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create PS folder on C: drive | |
| New-Item -ItemType Directory -Force -Path "C:\PS" | |
| # Set TLS versions for download (it will error otherwise) | |
| [Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls" | |
| # Download PsTools | |
| Invoke-WebRequest -Uri "https://download.sysinternals.com/files/PSTools.zip" -OutFile "C:\PS\PSTools.zip" | |
| # Extract PsTools to the PS folder | |
| Expand-Archive -Path "C:\PS\PSTools.zip" -DestinationPath "C:\PS" | |
| # Auto Accept EULA, can also run psexec with -accepteula | |
| #reg ADD HKCU\Software\Sysinternals\PSexec /v EulaAccepted /t REG_DWORD /d 1 /f | |
| # Start a new command prompt with Administrator privileges and run the commands | |
| Start-Process -FilePath "cmd.exe" -Verb RunAs -ArgumentList '/c c: && cd / && cd PS && psexec -accepteula -i -d -s "sc delete WLMS"' | |
| Start-Process -FilePath "cmd.exe" -Verb RunAs -ArgumentList '/c c: && cd / && cd PS && psexec -accepteula -i -s "REG DELETE HKLM\SYSTEM\CurrentControlSet\Services\WLMS /va /f"' |
Author
Doesn't work :(
In what way? Still shuts down? This is a bit old so maybe they updated it.
Yep, still shuts down. thanks!
Author
Yep, still shuts down. thanks!
Darn okay, I'll update the title of this so people don't get their hopes up. It worked at one point, I'll have to look into it again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't work :(