PowerShell Snippet #7: Retrieve SQL Server Licence Key
Copied from somewhere else on the internet, this PowerShell script will return the product key used for a SQL instance Install. Super useful when changing licenses on temporary VM’s I spin up and play around with to SQL Developer whose instances have passed the Enterprise evaluation use-by date. Putting this here for my own benefit. I claim no kudos! function GetSqlServerProductKey { ## function to retrieve the license key of a SQL 2014 Server.