Author | Simone Bizzotto (@niphold) , Friedrich Weinmann (@FredWeinmann) |
Availability | Windows, Linux, macOS |
Returns SQL Server Build infos 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 Life Cycle Policy
Get-DbaBuildReference
[[-Build] <Version[]>]
[[-Kb] <String[]>]
[[-MajorVersion] <String>]
[[-ServicePack] <String>]
[[-CumulativeUpdate] <String>]
[[-SqlInstance] <DbaInstanceParameter[]>]
[[-SqlCredential] <PSCredential>]
[-Update]
[-EnableException]
[<CommonParameters>]
PS C:\> Get-DbaBuildReference -Build "12.00.4502"
Returns information about a build identified by "12.00.4502" (which is SQL 2014 with SP1 and CU11)
PS C:\> Get-DbaBuildReference -Build "12.00.4502" -Update
Returns information about a build trying to fetch the most up to date index online. When the online version is newer, the local one gets overwritten
PS C:\> Get-DbaBuildReference -Build "12.0.4502","10.50.4260"
Returns information builds identified by these versions strings
PS C:\> Get-DbaRegServer -SqlInstance sqlserver2014a | Get-DbaBuildReference
Integrate with other cmdlets to have builds checked for all your registered servers on sqlserver2014a
Instead of connecting to a real instance, pass a string identifying the build to get the info back.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Get a KB information based on its number. Supported format: KBXXXXXX, or simply XXXXXX.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Get a KB information based on SQL Server version. Can be refined further by -ServicePack and -CumulativeUpdate parameters.
Examples: SQL2008 | 2008R2 | 2016
Alias | |
Required | False |
Pipeline | false |
Default Value |
Get a KB information based on SQL Server Service Pack version. Can be refined further by -CumulativeUpdate parameter.
Examples: SP0 | 2 | RTM
Alias | SP |
Required | False |
Pipeline | false |
Default Value | RTM |
Get a KB information based on SQL Server Cumulative Update version.
Examples: CU0 | CU13 | CU0
Alias | CU |
Required | False |
Pipeline | false |
Default Value |
Target any number of instances, in order to return their build state.
Alias | |
Required | False |
Pipeline | true (ByValue) |
Default Value |
Login to the target instance using alternative credentials. Accepts PowerShell credentials (Get-Credential).
Windows Authentication, SQL Server Authentication, Active Directory - Password, and Active Directory - Integrated are all supported.
For MFA support, please use Connect-DbaInstance.
Alias | |
Required | False |
Pipeline | false |
Default Value |
Adding this switch will look online for the most up to date reference, optionally replacing the local one.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
By default, when something goes wrong we try to catch it, interpret it and give you a friendly warning message.
This avoids overwhelming you with "sea of red" exceptions, but is inconvenient because it basically disables advanced scripting.
Using this switch turns this "nice by default" feature off and enables you to catch exceptions with your own try/catch.
Alias | |
Required | False |
Pipeline | false |
Default Value | False |
Want to see the source code for this command? Check out Get-DbaBuildReference on GitHub.
Want to see the Bill Of Health for this command? Check out Get-DbaBuildReference.