Skip to content

Instantly share code, notes, and snippets.

@ScriptingPro
Created August 1, 2023 19:00
Show Gist options
  • Save ScriptingPro/59c9f33102958a2a2b70fe341586aa5b to your computer and use it in GitHub Desktop.
Save ScriptingPro/59c9f33102958a2a2b70fe341586aa5b to your computer and use it in GitHub Desktop.
Check KMS Activation Server ports
# finds kms servers from DNS and checks if the port is open
Resolve-DnsName "_vlmcs._tcp.$([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().Name)" -Type all | %{Test-NetConnection -ComputerName $_.NameTarget -Port 1688}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment