1.KMS命令激活VOL版本Powershell脚本
$choice=read-host "Choice A wind7 pro OR Choice B win10 pro "
$time=Get-Date
if($choice -eq "A"){
$path = [Environment]::GetFolderPath("System")
Set-Location "$path"
cscript.exe slmgr.vbs -ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
cscript.exe slmgr.vbs -skms windows7kms.ath.cx:1688
cscript.exe slmgr.vbs -ato
cscript.exe slmgr.vbs -dli
Write-Output "wind7 pro Activation time : $time"
}
elseif($choice -eq "B"){
$path = [Environment]::GetFolderPath("System")
Set-Location "$path"
cscript.exe slmgr.vbs -ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
cscript.exe slmgr.vbs -skms slmgr /skms zh.us.to
cscript.exe slmgr.vbs -ato
cscript.exe slmgr.vbs -dli
Write-Output "win10 pro Activation time $time "
}
pause
文件保存为ps1格式,执行需要管理员权限。