dbatools is a free PowerShell module with over 200 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Get-DbaSqlBuildReference

Returns SQL Server Build information on a SQL instance.

Returns info about the specific build of a SQL instance, including the SP, the CU and the reference KB, wherever possible.

It also includes End Of Support dates as specified on Microsoft Lifecycle Policy.

Screenshots

Examples

Returns SqlInstance, SPLevel, CULevel, KBLevel, Supported Until for server sqlserver2014a.

Get-DbaSqlBuildReference -SqlInstance sqlserver2014a

Does the same as above but logs in as SQL user “sqladmin”.

$cred = Get-Credential sqladmin
Get-DbaSqlBuildReference -SqlInstance sqlserver2014a -SqlCredential $cred

Returns information about a build identified by “12.00.4502” (which is SQL 2014 with SP1 and CU11).

Get-DbaSqlBuildReference -Build “12.00.4502”

Author

This command was created by Simone Bizzotto. You can find Simone on LinkedIn.

Get-Help

From PowerShell, execute Get-Help Get-DbaSqlBuildReference -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaSqlBuildReference.ps1 on GitHub
 

Related commands