Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save makeitcloudy/eb80896a2832b38b33f5d487d13b593c to your computer and use it in GitHub Desktop.
Save makeitcloudy/eb80896a2832b38b33f5d487d13b593c to your computer and use it in GitHub Desktop.
#https://twitter.com/awakecoding/status/1537801562461982726?cn=ZmxleGlibGVfcmVjcw%3D%3D
#Activate Windows
#Go to settings to activate Windows
#If you're tired of seeing the Windows activation watermark come up in temporary lab environments, maybe you've found this registry trick that #works for some time, but didn't figure out that the registry key timestamp matters 👇
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation' -Name 'Manual' -Value '1' -Type DWORD
$TaskAction = New-ScheduledTaskAction -Execute 'powershell.exe' `
-Argument "-Command { Set-ItemProperty -Path 'HKLM:\SOFTWARE'Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\ACtivation' -Name 'Manual' -Value '1' -Type DWORD }"
$TaskTrigger = New-ScheduledTaskTrigger -AtStartup
Register-ScheduledTask -Action $TaskAction -Trigger $TaskTrigger -TaskName "Activation Watermark" -Description "Remove Windows Activation Watermark"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment