Skip to content

Commit ab757fa

Browse files
Get-DbaBuild - Add ReleaseDate to output object
(do Get-DbaBuild) Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>
1 parent 681e943 commit ab757fa

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

public/Get-DbaBuild.ps1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ function Get-DbaBuild {
7070
- KBLevel: Array of Knowledge Base (KB) article numbers associated with this build
7171
- BuildLevel: The normalized build version object
7272
- SupportedUntil: DateTime indicating when this build version reaches end of support from Microsoft
73+
- ReleaseDate: DateTime indicating when this build was released by Microsoft (null if not available in the index)
7374
- MatchType: Match precision ("Exact" for precise match or "Approximate" if closest available match)
7475
- Warning: Alert message if the build is retired or other issues detected (null if no warnings)
7576
7677
Properties when querying by -Build, -Kb, or -MajorVersion (SqlInstance excluded from display):
77-
When using these parameters, the SqlInstance property is excluded from the default display but all 9 properties remain accessible using Select-Object *.
78+
When using these parameters, the SqlInstance property is excluded from the default display but all 10 properties remain accessible using Select-Object *.
7879
7980
.LINK
8081
https://dbatools.io/Get-DbaBuild
@@ -356,6 +357,9 @@ function Get-DbaBuild {
356357
if ($null -ne $el.SupportedUntil) {
357358
$Detected.SupportedUntil = (Get-Date -Date $el.SupportedUntil)
358359
}
360+
if ($null -ne $el.ReleaseDate) {
361+
$Detected.ReleaseDate = [datetime]$el.ReleaseDate
362+
}
359363
$Detected.Build = $el.Version
360364
$Detected.KB = $el.KBList
361365
if (($Build -and $el.Version -eq $Build) -or ($Kb -and $el.KBList -eq $currentKb)) {
@@ -415,6 +419,7 @@ function Get-DbaBuild {
415419
KBLevel = $Detected.KB
416420
BuildLevel = $Detected.BuildLevel
417421
SupportedUntil = $Detected.SupportedUntil
422+
ReleaseDate = $Detected.ReleaseDate
418423
MatchType = $Detected.MatchType
419424
Warning = $Detected.Warning
420425
}
@@ -432,6 +437,7 @@ function Get-DbaBuild {
432437
KBLevel = $Detected.KB
433438
BuildLevel = $Detected.BuildLevel
434439
SupportedUntil = $Detected.SupportedUntil
440+
ReleaseDate = $Detected.ReleaseDate
435441
MatchType = $Detected.MatchType
436442
Warning = $Detected.Warning
437443
} | Select-DefaultView -ExcludeProperty SqlInstance
@@ -449,6 +455,7 @@ function Get-DbaBuild {
449455
KBLevel = $Detected.KB
450456
BuildLevel = $Detected.BuildLevel
451457
SupportedUntil = $Detected.SupportedUntil
458+
ReleaseDate = $Detected.ReleaseDate
452459
MatchType = $Detected.MatchType
453460
Warning = $Detected.Warning
454461
} | Select-DefaultView -ExcludeProperty SqlInstance
@@ -466,6 +473,7 @@ function Get-DbaBuild {
466473
KBLevel = $Detected.KB
467474
BuildLevel = $Detected.BuildLevel
468475
SupportedUntil = $Detected.SupportedUntil
476+
ReleaseDate = $Detected.ReleaseDate
469477
MatchType = $Detected.MatchType
470478
Warning = $Detected.Warning
471479
} | Select-DefaultView -ExcludeProperty SqlInstance

0 commit comments

Comments
 (0)