I just released a new PowerShell script, Get-SQLServerKeys.ps1. The script works works with several versions of SQL Server (2005-2014), and can use Central Management Server, a text file, or just a string of servers as input.
Like many of the Windows Key scripts available, this one relies on Remote Registry being enabled. However, if you’ve disabled this service, you can run Get-SQLServerKeys.ps1 on the SQL Server itself and all keys will be extracted for all local instances by accessing the registry directly.
Thanks goes out to Jakob Bindslet for providing the key decode function.
Get-SQLServerKeys.ps1 is one of several scripts that help DBA’s migrate SQL Servers. Check out my sqlmigration repository on github for more scripts.