Created
September 12, 2018 16:39
-
-
Save braaaax/24cf8353ff658a57723b8e5f5a9c1243 to your computer and use it in GitHub Desktop.
download and install kmspico -- lkys37en
This file contains 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
$KMSUrl = "https://codeload.github.com/charygao/KMSpico_v10.2.0/zip/master" | |
$KMSDst = "C:\windows\temp\KMSpico.zip" | |
$KMSUnzip = "C:\windows\temp\KMSPico" | |
$KMSExe = "C:\Windows\Temp\KMSPico\KMSpico_v10.2.0-master\KMSpico Portable\AutoPico.exe" | |
if ((Get-CimInstance -ClassName Win32_OperatingSystem).name -match "Windows 10" -or (Get-CimInstance -ClassName Win32_OperatingSystem).name -match "Server 2016") { | |
Write-Host "Temporarily disabling Windows Defender Real time Scanning" | |
Set-MpPreference -ExclusionPath C:\temp\windows\ | |
set-MpPreference -DisableRealtimeMonitoring $true | |
} | |
Write-Host "Downloading KMSPico" | |
(New-Object System.Net.WebClient).DownloadFile($KMSUrl, $KMSDst) | |
Write-Host "Expanding KMSPico archive" | |
Expand-Archive -Path $KMSDst -DestinationPath $KMSUnzip -Force | |
Write-Host "Activing Windows with KMSPico" | |
Start-Process -Wait -FilePath $KMSExe -ArgumentList "/silent" -PassThru | |
if ((Get-CimInstance -ClassName Win32_OperatingSystem).name -match "Windows 10" -or (Get-CimInstance -ClassName Win32_OperatingSystem).name -match "Server 2016") { | |
Write-Host "Enabling Windows Defender Real time Scanning" | |
Set-MpPreference -ExclusionPath C:\temp\windows\ | |
set-MpPreference -DisableRealtimeMonitoring $false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment