I really like the dbatools project. This is a series of PowerShell cmdlets that are built by the community and incredibly useful for migrations between SQL Servers, but also for various administrative actions. I have a short series on these items.
There are lots of tasks that are easily accomplished with both PowerShell and T-SQL.
UPDATE: The cmdlet was renamed to Get-DbaProductKey
Get-SqlServerKey is a command that will find your product keys. It’s not often you might need this, but it’s a pain to track them down from the registry and be sure you get them for all your instances.
Here’s the view from one of my development machines:
There is a limitation here that appears to have issues with SQL Server 2016, but it’s still helpful for other versions. You can also specify a list of servers in a file for this to use, as well as using credentials to connect.
A quick, handy item, and one that should make auditing (pre-2016) SQL Servers easy.
Hey Steve, thanks for the post mention dbatools project.
What version did you have use?
We have released a new version on 1st Feb and this command was one that was updated to take into account sql server 2016.
If you don’t have the latest version, can you please update the module and try it again?
Thanks in advance!
On behalf dbatools team 🙂
Thanks for the dbatools love! Support for SQL Server 2016 was added in the most recent release which came out on Feb 1.
I just retested on my local 2016 server which has a number of 2016 instances — all worked. Kind of late, but I promise vnext will be supported faster 😉 It’s just one line of code.
LOL, only now do I see Claudio’s response. Thanks Claudio!
Yikes, you people are on the ball. I don’t think I’ve updated in a couple weeks. I’ll update and then adjust the post.