snippetMinor
How to obtain SQL feature list from the command line
Viewed 0 times
theobtainlinesqlhowlistfromcommandfeature
Problem
Is there a command at the CLI or in PowerShell that will list the components installed for SQL? I'm looking for something like the Feature List you can get from running the discovery report from Tools in the SQL Server Installation Center program option.
I'm running SQL Server 2012 on the CORE version of Windows Server 2008 R2 Enterprise. I've searched around the Net, but haven't found anything useful.
I'm running SQL Server 2012 on the CORE version of Windows Server 2008 R2 Enterprise. I've searched around the Net, but haven't found anything useful.
Solution
The components for SQL Server 2012 are divided by server and then management tools. You can get the server level components by using a PowerShell command like:
To get the management tools would require either registry search for the uninstall list or you can query the WMI class
Get-Service *SQL*To get the management tools would require either registry search for the uninstall list or you can query the WMI class
win32_product:get-wmiobject win32_product |
where {$_.Name -match "SQL" -AND $_.vendor -eq "Microsoft Corporation"} |
select name, versionCode Snippets
Get-Service *SQL*get-wmiobject win32_product |
where {$_.Name -match "SQL" -AND $_.vendor -eq "Microsoft Corporation"} |
select name, versionContext
StackExchange Database Administrators Q#77016, answer score: 2
Revisions (0)
No revisions yet.