Using a string of servers, a text file, or Central Management Server to provide a list of servers, this script will go to each server and get the product key for all installed instances. Clustered instances are supported as well.
Requires regular user access to the SQL instances, SMO installed locally, Remote Registry enabled and accessible by the account running the script.
Uses key decoder by Jakob Bindslet (http://goo.gl/1jiwcB)
Gets SQL Server versions, editions and product keys for all instances within each server or workstation.
Get-DbaSqlServerKey winxp, sqlservera, sqlserver2014a, win2k8
Gets SQL Server versions, editions and product keys for all instances within sqlserver01’s Central Management Server.
Get-DbaSqlServerKey -SqlCms sqlserver01
Gets SQL Server versions, editions and product keys for all instances listed within C:\Scripts\servers.txt.
Get-DbaSqlServerKey -ServersFromFile C:\Scripts\servers.txt