When you need to know more information about your SQL environment or cluster, you can check every SQL server separate from each other. This is time consuming to do, definitely if you have a big SQL cluster or environment.
You can use also automate this steps, to use this very simple command!
Go to your SQL environment and browse to the following directory (it depends per SQL version)
* SQL Server 2012 (110)
* SQL Server 2014 (120)
* SQL Server 2016 (130)
* SQL Server 2017 (140)
* SQL Server 2019 (150)
’%programfiles%\Microsoft SQL Server\110\Setup Bootstrap\SQL2012” from the command prompt. Run the command:
’setup.exe /ACTION=RunDiscovery’
By default, there will be created a new file called ‘Summary.txt’, with the configuration of your SQL environment, cluster or AOAG if you’re using Always-On Availability Groups.. Not very usefull and readable. Not very readable, so now Powershell comes in!
Start Powershell and run the following command:
Get-Content “<location of your summary.txt file>. Now you get a report!!