Retrieve the KMS Host Name First, open PowerShell with administrative rights. Then, use the following command to retrieve the KMS host name:

$kmsHost = (Get-WmiObject -query "select * from SoftwareLicensingService").KeyManagementServiceMachine
Write-Output "KMS Host: $kmsHost"

Verify the KMS Host To ensure that the KMS host is actively communicating within your network, perform the following checks:

  • Ping Test: Verify if the server is reachable
if (Test-Connection -ComputerName $kmsHost -Count 2 -Quiet) {
    Write-Output "Ping to $kmsHost successful."
} else {
    Write-Output "Failed to ping $kmsHost."
}

Port Check: Confirm that the necessary port for KMS (TCP 1688) is open.

$port = 1688
$tcpTest = New-Object System.Net.Sockets.TcpClient
try {
    $tcpTest.Connect($kmsHost, $port)
    if ($tcpTest.Connected) {
        Write-Output "Port $port on $kmsHost is open."
    }
    $tcpTest.Close()
} catch {
    Write-Output "Port $port on $kmsHost is not open."
}

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.