This PowerShell script automates the process of removing old license keys, clearing previous KMS configurations, and activating Windows 11 Professional using a public KMS server.
⚠️ This script is intended strictly for educational and testing purposes in environments where volume activation is legally permitted.
The script runs the following commands in sequence:
Write-Host "Uninstalling current product key..." -ForegroundColor Cyan
Start-Process -FilePath "cscript.exe" -ArgumentList "C:\Windows\System32\slmgr.vbs /upk" -NoNewWindow -Wait
Write-Host "Clearing the product key from the registry..." -ForegroundColor Cyan
Start-Process -FilePath "cscript.exe" -ArgumentList "C:\Windows\System32\slmgr.vbs /cpky" -NoNewWindow -Wait
Write-Host "Clearing any configured KMS server..." -ForegroundColor Cyan
Start-Process -FilePath "cscript.exe" -ArgumentList "C:\Windows\System32\slmgr.vbs /ckms" -NoNewWindow -Wait
Write-Host "Installing new product key..." -ForegroundColor Cyan
Start-Process -FilePath "cscript.exe" -ArgumentList "C:\Windows\System32\slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX" -NoNewWindow -Wait
Write-Host "Setting the KMS server to kms8.msguides.com..." -ForegroundColor Cyan
Start-Process -FilePath "cscript.exe" -ArgumentList "C:\Windows\System32\slmgr.vbs /skms kms8.msguides.com" -NoNewWindow -Wait
Write-Host "Activating Windows..." -ForegroundColor Cyan
Start-Process -FilePath "cscript.exe" -ArgumentList "C:\Windows\System32\slmgr.vbs /ato" -NoNewWindow -Wait
Write-Host "All commands completed." -ForegroundColor GreenEach command performs a distinct function in resetting and reconfiguring the Windows activation setup.
https://www.virustotal.com/gui/file/fdb4afdd4e21a3efe16e5e91d585c27297c548e791c83884d387538c947f064e
https://www.hybrid-analysis.com/sample/fdb4afdd4e21a3efe16e5e91d585c27297c548e791c83884d387538c947f064e
-
Uninstalls the current product key
slmgr.vbs /upk -
Clears the product key from the registry
slmgr.vbs /cpky -
Clears any previously configured KMS server
slmgr.vbs /ckms -
Installs the official Microsoft KMS client key for Windows 11 Pro
slmgr /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
-
Sets the KMS server
slmgr /skms kms8.msguides.com
-
Activates Windows using the KMS server
slmgr /ato
You can download the raw file by clicking 'activatewin11pro.ps1' above or find the latest release here: Releases
If you download the .zip folder, make sure to extract it, and move the 'activatewin11pro.ps1' to your downloads folder.
Save activatewin11pro.ps1 from this repository to your Downloads folder.
🔒 This script must be run as Administrator.
To do this:
- Click the Start Menu
- Type
PowerShell - Right-click on Windows PowerShell
- Choose "Run as administrator"
In the PowerShell window, enter the following commands:
cd ~
cd DownloadsThis ensures you're in the directory where your script is saved.
Now run the script using this command:
Set-ExecutionPolicy Bypass -Scope Process -Force; .\activatewin11pro.ps1-
Set-ExecutionPolicy Bypass: Temporarily allows script execution. -
-Scope Process: Applies only to the current PowerShell session (safe and non-permanent). -
-Force: Skips confirmation prompts. -
.\activatewin11pro.ps1: Executes the script file in the current folder.
Once the script completes, confirm that Windows is activated:
- Open Settings
- Go to System > Activation
- You should see Product Activated Successfully
This script uses Microsoft’s public KMS client key and connects to a third-party KMS server.
It is intended for:
- Lab/testing environments
- Virtual machines
- Educational demonstrations
Do not use this script for unauthorized activation. You are responsible for ensuring legal and license-compliant usage.