12 lines
472 B
PowerShell
12 lines
472 B
PowerShell
powershell -noprofile -command "Set-ExecutionPolicy bypass LocalMachine"
|
|
|
|
#Write-host "Operating system is $OSversion"
|
|
$kmshost = '10.0.14.20'
|
|
Write-Host "Le serveur KSM est defini sur $kmshost"
|
|
#Write-host "KMS client key is $Key"
|
|
sleep -Seconds 2
|
|
Write-host 'Forcing activation using slmgr script...'
|
|
cscript $env:windir\System32\slmgr.vbs /skms $kmshost 2>&1
|
|
#cscript $env:windir\System32\slmgr.vbs /ipk $key 2>&1
|
|
cscript $env:windir\System32\slmgr.vbs /ato 2>&1
|
|
break |