When you deploy a new KMS server in order to replace your existing KMS server, you will need to update the “_VLMCS” DNS record. But you may want to manually force your clients to query the new KMS server. To perform this task, you can use slmgr.vbs in a PowerShell script.
First, get all the computers objects from Active Directory using the Get-ADComputer cmdlet.
Next, use slmgr.vbs with the “-skms” parameter followed by the new KMS server FQDN.
Finally, force the activation using the “-ato” parameter:
$ADComputers = Get-ADComputer -Filter 'ObjectClass -eq "Computer"' -SearchBase "OU=Servers,DC=GET-CMD,DC=local" | Select -Expand DNSHostName foreach ($Comp in $ADComputers) { slmgr.vbs $Comp -SKMS <FQDN_KMS_Server.get-cmd.local> slmgr.vbs -ato }
That’s all! All your clients has been updated!
Thanks for reading! You can follow me on Twitter @PrigentNico