From e8e8b5153799e9e8492fddd0d242ace9ef21eedb Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Tue, 24 Sep 2024 21:09:16 +0100 Subject: [PATCH 1/7] dev --- CI/WindowOSBuild.Tests.ps1 | 56 +++++++++++++-------------- Public/Get-CurrentOSBuild.ps1 | 70 +++++++++++++++++++--------------- WindowsOSBuild.psd1 | Bin 37336 -> 37336 bytes 3 files changed, 68 insertions(+), 58 deletions(-) diff --git a/CI/WindowOSBuild.Tests.ps1 b/CI/WindowOSBuild.Tests.ps1 index e6d7ded..706125f 100644 --- a/CI/WindowOSBuild.Tests.ps1 +++ b/CI/WindowOSBuild.Tests.ps1 @@ -305,7 +305,7 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Server2022Hotpatch -OSVersion 21H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Build.Count | Should -BeGreaterThan 1 $Results.Version | Should -Not -BeNullOrEmpty $Results.Build | Should -Not -BeNullOrEmpty $Results.'Availability date' | Should -Not -BeNullOrEmpty @@ -723,7 +723,7 @@ Else { It "Results" { $Results = Get-LatestOSBuild -OSName Server2022Hotpatch -OSVersion 21H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Build.Count | Should -BeGreaterThan 1 $Results.Version | Should -Not -BeNullOrEmpty $Results.Build | Should -Not -BeNullOrEmpty $Results.'Availability date' | Should -Not -BeNullOrEmpty @@ -843,8 +843,8 @@ Else { # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUpxBl7mYJMJaIsIcIMKzO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QIgUrFS+LZGybP57FDkZlNMvO+ +# Rg2Z9lXt2sxkrGu2f9qDMrG4Ge5SdvfEtzB/w8AMlD1meiuF8u9i8mfpV82+Iqij +# VWS5vaImlte+EWF9GZLRyqctBYzxWUxH6+203t7g5usMCkNIf3CgTJs9qxpKuYa5 +# k9fM3ICJWzEceelAkq5W8C03ZpOvzWGeY2eJmz6AtWmbtg4eb0ZtRAIewsUEZedU +# qkEAhKKWZaZxXQ52QF0cdJ1BBPwxXP3IcnH9BXnuwZuIzvcsp4y0PM9oyhWYREia +# svLPD+G5s13zqKlvuPmGJq/71mHa/oJySUXn6U+Zqz7SURuSZs7jGNPE6WkC4+qF +# zL70imPOPqIGYyhIWLOl3a2Tk39AZGfEDOCV2c9mqszR2+VBCl7FpInrxlQUs3Xn +# A8Nqp7ExwaXpnUcnvyHw3TPSgORElruft1VCxtiqBAjl/lVZ4cbTtlYqesuWLV3t +# Chyp7hHXTD1yDIRHzoeoh+k2AC7/myxNEcQcUqao3Kur0Edr1htgRR69OlJYoGZF +# 1ZxuwxFLbrtlStJpQjU/A4sz7VvA6yXGwVOEl/cLdYLAiLEXuz0dNXSloprFma7S +# 8zStNT10OM8GUaSlDbwUdShIoQOExE10NNYrO1mV9qem1sOlKN+G3Em4TztcdLOS +# lA1+c5qT # SIG # End signature block diff --git a/Public/Get-CurrentOSBuild.ps1 b/Public/Get-CurrentOSBuild.ps1 index 19da9dc..254c066 100644 --- a/Public/Get-CurrentOSBuild.ps1 +++ b/Public/Get-CurrentOSBuild.ps1 @@ -61,12 +61,10 @@ ElseIf ($GetOSCaption -match "Server 2019") { $DetectedOS = "Server2019" } - ElseIf ($GetOSCaption -match "Server 2022") { - $DetectedOS = "Server2022" - } ElseIf ($GetOSCaption -match "Server 2022") { If (Get-HotFix -Id KB5003508 -ErrorAction SilentlyContinue) { $DetectedOS = "Server2022Hotpatch" + $FallBackOS = "Server2022" } Else { $DetectedOS = "Server2022" @@ -79,7 +77,19 @@ Throw "Get-CurrentOSBuild: Unable to detect operating system. OS Caption: $GetOSCaption, Detected OS: $DetectedOS" } - Get-LatestOSBuild -OSName $DetectedOS -OSversion $(Get-Build) -LatestReleases 1000 | Where-Object -Property Build -eq $CurrentOSBuild + # Hotpatch OS + If ($FallBackOS) { + $Results = Get-LatestOSBuild -OSName $DetectedOS -OSversion $(Get-Build) -LatestReleases 1000 | Where-Object -Property Build -eq $CurrentOSBuild + # Handle Hotpatch capable OS thats is not using hotpatch updates + If (!$Results) { + $Results = Get-LatestOSBuild -OSName $FallBackOS -OSversion $(Get-Build) -LatestReleases 1000 | Where-Object -Property Build -eq $CurrentOSBuild + } + $Results + } + # All other OS + Else { + Get-LatestOSBuild -OSName $DetectedOS -OSversion $(Get-Build) -LatestReleases 1000 | Where-Object -Property Build -eq $CurrentOSBuild + } } Else { Return $CurrentOSBuild @@ -88,8 +98,8 @@ # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUL3iciI51XcmRPJIZ9MSVSMzn -# CdaggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUqFZ/tiexSOrpT9eGkrxo1ILV +# SfCggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B # AQwFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD # VQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVk # IElEIFJvb3QgQ0EwHhcNMjIwODAxMDAwMDAwWhcNMzExMTA5MjM1OTU5WjBiMQsw @@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oNmMew5jLxtXsmz4pOGgqVtTSUqtpK8LeFVV3U47AFUaiej8I +# 8wJVbj91GX+lEitJRhpnW3u8cKlD9gBok7xg/RcBbP++3Qm2dYDP14lelFtNn0gp +# e3y6akctEzTm2ne9P/KotPf+tDXKGGgHijtVylKhk8wOiT2GVEtbNyOoCXuvzYJi +# xV8SusVncE61N7/YBqr2ta99nrPD0Xw0Iu28VK5/H2z2vMRJ7wkZEo+JxfiEdul8 +# XHic8hTH # SIG # End signature block diff --git a/WindowsOSBuild.psd1 b/WindowsOSBuild.psd1 index adeb22446b8d3f5e43e2a9f71e797b1b717f7c97..0669818057d9e4b1be820ae84b8f45565cb96527 100644 GIT binary patch delta 2860 zcmYM0NsA*#5QSsfH^ck{!@z)H5JvlkF@s8bX>08Z3`YCj+SQUSb@9RAi%p+=o?kHZ z*(cu&zR%C`7dcaHgi4i}5ij0*kyWYBAMZYYy!-v1Zvqnf^zY-VSApmB-Cu8ivLq)7 z8OuN_QkT4VBrY8ZiYXhe=;6~cAKOG2CY6muD)JqD=@P#zqrLA?M% zjsg>6+jzObQMX+?%C8M}9!g2_Iq3J|`O~A4Xa1r)nwD_?} zcglvMQ4(W}4RNfatc2a@B6`Svm97XCezw7y<*F$}ks%zz%ICO57Nya4Qa_HTNZOT9hgC zdjqLMBl3*HAa@xhnA;=x9=~3T^W{-Wuy7$@0nEtk`=KF}0qTaXIKTSvDM$~ZCA5!;tFyujh8QnI^N<Gpgu7hR7Z^m9)2^->7E-=MJ3j#e`U7}Xy1aJ zHl*$8ml_Ew4~-oOSRTMVbM@ip3U}4*BX~83qH*L!aMJ>Gi6sN>Z#1(7#Dvd~RDHB# zj8$3&*fJ1$2(-!au=?e7mIU5L%!GVb>x+BOYcw5I-K(j&J>jy@1) zR)>5q4nIp+rD>?wzy!=W5T(&8EN-HtjxT+Fr>t~LJ1*FLqC|tzS+Xar={vp!5m265C~T z=98mP8bULgq6el%#vql2ZUH*_TG#fp$=VUs=Wa_ITt{pvJHVW<#D}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2/7] dev --- Public/Get-LatestOSBuild.ps1 | 55 ++++++++++++++++++----------------- WindowsOSBuild.psd1 | Bin 37336 -> 37336 bytes 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/Public/Get-LatestOSBuild.ps1 b/Public/Get-LatestOSBuild.ps1 index 1a77a89..d83f5a0 100644 --- a/Public/Get-LatestOSBuild.ps1 +++ b/Public/Get-LatestOSBuild.ps1 @@ -122,7 +122,8 @@ $AtomFeedUrl = "https://support.microsoft.com/en-us/feed/atom/6ae59d69-36fc-8e4d-23dd-631d98bf74a9" } ElseIf ($OSName -eq "Server2022" -or $OSName -eq "Server2022Hotpatch") { - $HotpatchOS = Get-HotFix -Id KB5003508 -ErrorAction SilentlyContinue + # Disabled automatic detection of hotfix as it is not a reliable method of guaranteeing devices are applying hotpatch updates, non-hotpatch updates can still be applied. + # $HotpatchOS = Get-HotFix -Id KB5003508 -ErrorAction SilentlyContinue if ($HotpatchOS -or ($OSName -eq "Server2022Hotpatch")) { $URL = "https://support.microsoft.com/en-gb/topic/release-notes-for-hotpatch-in-azure-automanage-for-windows-server-2022-4e234525-5bd5-4171-9886-b475dabe0ce8" $AtomFeedUrl = "https://support.microsoft.com/en-us/feed/atom/2d67e9fb-2bd2-6742-08ee-628da707657f" @@ -505,8 +506,8 @@ # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUKZJipNqf5FaaoR1PFNsc4BDD -# EeCggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUPsSGyx6hqv0zPP39IhhpKonn +# F9eggiAtMIIFjTCCBHWgAwIBAgIQDpsYj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8414FkOEZPkJ4MI3ur89ba6hNs8jgSc +# ymxTTm/C2/UCV8z90oy5qSS/2WEbu1a1F2mBqqAqUBomUPudtpRXOHXNUdSCJzWM +# 00pT6u7DKFkyrOheCokmivcijJklfROD/Eo3Tvn0CVmyi/yeTrDnGHTu77AHsGMl +# VNGiJgN0h8KYqk6NqebMw8dgSk3Lndzf46NfyoKLLaBE4WK+LI0ctICvF79W+1il +# NxrgVC0lp69avd2k6zzZ3H1LOPICpcgYNAUwyAXp2kgu3tiLJu+e+EPzb/Y4jR7P +# dzW+Rgkce1SWltsy1F1RJzEhSJQ1s8zxxjnQGCGcBZkB03vhlrL4OEXeTfT456qF +# OCvVbtdm0qOpg8nTj1S5p9sUYcXTkFx8qofiVqhOh1UYaG8Egsq2GDvzqTCPJn8A +# vOZSJ/nHQIWaOD4yJ0W8wB58lBaG0xz4JPUkB7IPy7qKTVvlglKnin46BSuYeDmi +# DKNl5apq # SIG # End signature block diff --git a/WindowsOSBuild.psd1 b/WindowsOSBuild.psd1 index 0669818057d9e4b1be820ae84b8f45565cb96527..f07c88460aa683d1e90a84bd7e875566edd2eae3 100644 GIT binary patch delta 2874 zcmX}u&2B2$6$RjvJBbphpCOT2iqt}i@gLZVqLu+0+h7|E*l?pB*arK8jqxAXh6$4l zB4v{3jxz2iXx(u}nPr+uKTf_~Ev!;eRp;!z*4k^II>paFe)##v5C8b@Z}Mq9t)$hI z|LK3XzxuUn`eR!Cy8GeZ-~M?!_0oRor|Wd$Zj^GVm0nUq$Sj?uz0^*%H1>4pdXSpw zoAlfCZTfv0q>rim_4_~k=ZDP$$s58q(_QLH-A_kgYUv?8VcnA2F>{>i;HqgCTrW+& z6#x3CMGf$y>~0#m8z7u{uDd@-6-f7v({z!_gf(T~!}^^44l<+y&T@Klu0nWz7dKYI zE8GYC{j{U{W?IAh0`*Dsl)8)5UYIzO{+LRtITA2II(AgkjgTCwV+mvF_e6f;(Keu( z__{LB zVMBLap=}98u1p+zsQPA_su_XGrMc%jvv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C4L8Cav=*Q9DVQfjj0O11IpYUDt(VbqJ4(K9Dp8zjj*agCt1g@Zcid~BtJ!~3KsA7F$G)Czj87%3NsCZb6e`F9^$W73yI%LrRQAswfBpIHb(#s= zm=%au!F&Ke7qa%``OW{nPB1;1!a$r^?`7UiwCs3vM|X{44=UGC+wjw!?FDDddrP<+ zL04e-Kyb13Xl=^&Y5(@ElSFlaZ0L>%V0)vbi%|E>7JgBa1rOgWW4h`lL{X7V;@hm3 z5d~bb*2WY*^AaOLuf8nA20m zM`=8aj1Z85bhqm0!6i+hu?3sx-xcfiXaKnteJF9RWqM{nv0 z-g?A^AoAr%YodHZGWS%p!t@RGkEB0`GQD54a#>va%xg$LBO55LnX`%B6BQl9Y{A=@Ts#IP>{ z<|jyruP(_j^b=Se87W{NLZzNPwpm$vKc%3m9(oVyHINWTukJaj8mQH@yF?yv8UPU{ z4^1ph0tR#>$u#{^g)q19$KuMd-u);o{US~{-q{}9_{!P(;N=?XgczmeP Wv*G`%Awu=0MwMRQlczubc=sQ}TG!D4 From 6f2d3514f8848d4c435cbbb4a40489bdc2b81a09 Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:53:26 +0100 Subject: [PATCH 3/7] dev --- CI/WindowOSBuild.Tests.ps1 | 975 +++++++++++++++++++---------------- Public/Get-LatestOSBuild.ps1 | 54 +- 2 files changed, 545 insertions(+), 484 deletions(-) diff --git a/CI/WindowOSBuild.Tests.ps1 b/CI/WindowOSBuild.Tests.ps1 index 706125f..f21c387 100644 --- a/CI/WindowOSBuild.Tests.ps1 +++ b/CI/WindowOSBuild.Tests.ps1 @@ -3,18 +3,45 @@ BeforeAll { . Import-Module -Name $Path -Verbose } +# Function to check if a string contains a valid date in YYYY-MM-DD format +function Find-ValidDate { + param ( + [string]$InputString + ) + + # Trim whitespace from the input string + $InputString = $InputString.Trim() + + # Try to parse the date + try { + [datetime]::ParseExact($InputString, "yyyy-MM-dd", $null) | Out-Null + return $true + } catch { + return $false + } +} + +function Find-TrueOrFalse { + param ( + [object]$Value + ) + + # Return true if the value is either $true or $false + return $Value -eq $true -or $Value -eq $false +} + If ($PSVersionTable.PSVersion.Major -le 6) { Describe "PS - Get-LatestOSBuild" { Context "Win 10 (1507)" { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1507 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1507 (RTM) (OS build 10240)' + $Results.Build | Should -Match '^10240\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -26,12 +53,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1511 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1511 (OS build 10586)' + $Results.Build | Should -Match '^10586\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -43,12 +70,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1607 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1607 (OS build 14393)' + $Results.Build | Should -Match '^14393\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -60,12 +87,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1703 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1703 (OS build 15063)' + $Results.Build | Should -Match '^15063\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -77,12 +104,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1709 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1709 (OS build 16299)' + $Results.Build | Should -Match '^16299\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -94,12 +121,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1803 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1803 (OS build 17134)' + $Results.Build | Should -Match '^17134\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -111,12 +138,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1809 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1809 (OS build 17763)' + $Results.Build | Should -Match '^17763\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -128,12 +155,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1903 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1903 (OS build 18362)' + $Results.Build | Should -Match '^18362\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -144,12 +171,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1909 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1909 (OS build 18363)' + $Results.Build | Should -Match '^18363\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -160,12 +187,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 2004 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 2004 (OS build 19041)' + $Results.Build | Should -Match '^19041\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -176,12 +203,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 20H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 20H2 (OS build 19042)' + $Results.Build | Should -Match '^19042\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -192,12 +219,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 21H1 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H1 (OS build 19043)' + $Results.Build | Should -Match '^19043\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -208,12 +235,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 21H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 19044)' + $Results.Build | Should -Match '^19044\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } $Results.'KB article' | Should -Not -BeNullOrEmpty @@ -225,12 +252,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 22H2 (OS build 19045)' + $Results.Build | Should -Match '^19045\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -241,12 +268,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 21H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 22000)' + $Results.Build | Should -Match '^22000\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -257,12 +284,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 22H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 22H2 (OS build 22621)' + $Results.Build | Should -Match '^22621\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -273,12 +300,28 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 23H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 23H2 (OS build 22631)' + $Results.Build | Should -Match '^22631\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } + } + Context "Win 11 (24H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 24H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 24H2 (OS build 26100)' + $Results.Build | Should -Match '^26100\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -289,12 +332,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Server2022 -OSVersion 21H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 20348)' + $Results.Build | Should -Match '^20348\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -305,9 +348,9 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName Server2022Hotpatch -OSVersion 21H2 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 20348)' + $Results.Build | Should -Match '^20348\.' $Results.'Availability date' | Should -Not -BeNullOrEmpty $Results.Hotpatch | Should -Not -BeNullOrEmpty $Results.Preview | Should -Not -BeNullOrEmpty @@ -322,12 +365,12 @@ If ($PSVersionTable.PSVersion.Major -le 6) { It "Results" { $Results = Get-LatestOSBuild -OSName ServerSAC -OSVersion 1709 -latestreleases 1000 Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1709 (OS build 16299)' + $Results.Build | Should -Match '^16299\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -350,9 +393,9 @@ If ($PSVersionTable.PSVersion.Major -le 6) { $Results.Build.Count | Should -Be 1 $Results.Version | Should -Not -BeNullOrEmpty $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -423,333 +466,351 @@ If ($PSVersionTable.PSVersion.Major -le 6) { } Else { Describe "PWSH - Get-LatestOSBuild" { - Context "Win 10 (1507)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1507 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Describe "PS - Get-LatestOSBuild" { + Context "Win 10 (1507)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1507 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1507 (RTM) (OS build 10240)' + $Results.Build | Should -Match '^10240\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (1511)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1511 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (1511)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1511 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1511 (OS build 10586)' + $Results.Build | Should -Match '^10586\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 / Server 2016 (1607)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1607 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 / Server 2016 (1607)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1607 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1607 (OS build 14393)' + $Results.Build | Should -Match '^14393\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (1703)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1703 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (1703)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1703 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1703 (OS build 15063)' + $Results.Build | Should -Match '^15063\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (1709)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1709 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (1709)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1709 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1709 (OS build 16299)' + $Results.Build | Should -Match '^16299\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (1803)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1803 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (1803)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1803 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1803 (OS build 17134)' + $Results.Build | Should -Match '^17134\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 / Server 2019 (1809)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1809 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 / Server 2019 (1809)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1809 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1809 (OS build 17763)' + $Results.Build | Should -Match '^17763\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (1903)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1903 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (1903)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1903 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1903 (OS build 18362)' + $Results.Build | Should -Match '^18362\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (1909)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1909 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (1909)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 1909 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1909 (OS build 18363)' + $Results.Build | Should -Match '^18363\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (2004)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 2004 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (2004)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 2004 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 2004 (OS build 19041)' + $Results.Build | Should -Match '^19041\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (20H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 20H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (20H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 20H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 20H2 (OS build 19042)' + $Results.Build | Should -Match '^19042\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (21H1)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 21H1 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (21H1)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 21H1 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H1 (OS build 19043)' + $Results.Build | Should -Match '^19043\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (21H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 21H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (21H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 21H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 19044)' + $Results.Build | Should -Match '^19044\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | ForEach-Object { $_ -match "•|\u2022" } | Where-Object { $_ -eq $true } + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 10 (22H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 10 (22H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 22H2 (OS build 19045)' + $Results.Build | Should -Match '^19045\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 11 (21H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 21H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 11 (21H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 21H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 22000)' + $Results.Build | Should -Match '^22000\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 11 (22H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 22H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 11 (22H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 22H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 22H2 (OS build 22621)' + $Results.Build | Should -Match '^22621\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Win 11 (23H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 23H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 11 (23H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 23H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 23H2 (OS build 22631)' + $Results.Build | Should -Match '^22631\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Server 2022 (21H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Server2022 -OSVersion 21H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Win 11 (24H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Win11 -OSVersion 24H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 24H2 (OS build 26100)' + $Results.Build | Should -Match '^26100\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Server 2022 Hotpatch (21H2)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName Server2022Hotpatch -OSVersion 21H2 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Hotpatch | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Server 2022 (21H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Server2022 -OSVersion 21H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 20348)' + $Results.Build | Should -Match '^20348\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } - } - Context "Server SAC (1709)" { - It "Results" { - $Results = Get-LatestOSBuild -OSName ServerSAC -OSVersion 1709 -latestreleases 1000 - Start-Sleep -Seconds 0 - $Results.Build.Count | Should -BeGreaterThan 1 - $Results.Version | Should -Not -BeNullOrEmpty - $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty - $Results.'Servicing option' | Should -Not -BeNullOrEmpty - $Results.'KB article' | Should -Not -BeNullOrEmpty - $Results.'KB URL' | Should -Not -BeNullOrEmpty - $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + Context "Server 2022 Hotpatch (21H2)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName Server2022Hotpatch -OSVersion 21H2 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 21H2 (OS build 20348)' + $Results.Build | Should -Match '^20348\.' + $Results.'Availability date' | Should -Not -BeNullOrEmpty + $Results.Hotpatch | Should -Not -BeNullOrEmpty + $Results.Preview | Should -Not -BeNullOrEmpty + $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } + } + Context "Server SAC (1709)" { + It "Results" { + $Results = Get-LatestOSBuild -OSName ServerSAC -OSVersion 1709 -latestreleases 1000 + Start-Sleep -Seconds 0 + $Results.Build.Count | Should -BeGreaterThan 0 + $Results.Version | Should -Contain 'Version 1709 (OS build 16299)' + $Results.Build | Should -Match '^16299\.' + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Servicing option' | Should -Not -BeNullOrEmpty + $Results.'KB article' | Should -Not -BeNullOrEmpty + $Results.'KB URL' | Should -Not -BeNullOrEmpty + $Results.'Catalog URL' | Should -Not -BeNullOrEmpty + } } } } @@ -769,9 +830,9 @@ Else { $Results.Build.Count | Should -Be 1 $Results.Version | Should -Not -BeNullOrEmpty $Results.Build | Should -Not -BeNullOrEmpty - $Results.'Availability date' | Should -Not -BeNullOrEmpty - $Results.Preview | Should -Not -BeNullOrEmpty - $Results.'Out-of-band' | Should -Not -BeNullOrEmpty + $Results.'Availability date' | ForEach-Object { Find-ValidDate $_ } | Where-Object { $_ -eq $true } + $Results.Preview | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } + $Results.'Out-of-band' | ForEach-Object { Find-TrueOrFalse $_ } | Where-Object { $_ -eq $true } $Results.'Servicing option' | Should -Not -BeNullOrEmpty $Results.'KB article' | Should -Not -BeNullOrEmpty $Results.'KB URL' | Should -Not -BeNullOrEmpty @@ -843,8 +904,8 @@ Else { # SIG # Begin signature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em4TztcdLOS -# lA1+c5qT +# SIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTI0MTAwMzIxNTMw +# N1owLwYJKoZIhvcNAQkEMSIEIIVQX1def3HqkR24lZ7vgpvbyUxICfQCnMcpFANO +# +jDzMA0GCSqGSIb3DQEBAQUABIICAAfXIOb1ViBrcc3q9bZgqGa0UwuNshSRevuF +# cuwLU3egVb7cRH3wkYz/OkR+AjQD6R0juEiqMCBjqUQL4H6DJirVmfqJ77xZwrHV +# KIKDEtzzI8Y9MhEKBhZ3VdUXqf+7AHHgnCdl0Q9bvLkkDr1iy1sEV1cFuswHBbYm +# rhYOaZbOlUZ69BWKa/+KZfWsygebeqRUBltTdwU3hDFWuH/mBcZJGup7Q8Ymst+T +# tYCH0gqPUfo1I0kRxRvl3+IuUUhpKD4ZR7KBwu7SGpD9y6DA0WewiumJM78+WTJ8 +# ptDCl7Os1BrP/JHW8XIVtfTJFyFB7Fr7/URmtoWnqUneSx4irDJdnZJnyHJcxjpA +# QoUF7GRR8qw6J4QvUranB/5R8ctUEk9D54qfmvvQ00dnq+Edm1kjHfeyFf3rIwhP +# 5aCoShIBVVgiV2G8+CHFtEyr2TBHD6A0f3uT0XxA9pTg6SrKdRjTpb9ameWJbE/K +# v561Bh5CLF14kpkl6/QHJ4jAF4j8cIZ73Xj7ucR/VADwgJ7VO5fO10pzHmuL8XIH +# g29q3esyEc2/tV3XoM+myXrW8YUOdC/YlaEK/9IKJYSSoakKzdLqiE2YnV+yX59k +# Nn+jDcLW2+ip6uSxyBl4yx/NtMBOyMUEBtsw/avPj3hxgGUI1/OctZzin+AQvcek +# edD7L5we # SIG # End signature block diff --git a/Public/Get-LatestOSBuild.ps1 b/Public/Get-LatestOSBuild.ps1 index d83f5a0..ff7bdf6 100644 --- a/Public/Get-LatestOSBuild.ps1 +++ b/Public/Get-LatestOSBuild.ps1 @@ -345,7 +345,7 @@ [PSCustomObject]@{ 'Base' = $OSBase 'Version' = $Version - 'TableNumber'= $ReleaseVersions.IndexOf($Version) + 1 + 'TableNumber'= $ReleaseVersions.IndexOf($Version) + 2 } } # Windows 10 Base OS @@ -506,8 +506,8 @@ # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUPsSGyx6hqv0zPP39IhhpKonn -# F9eggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUw56sjJLGJUsXU0kJ33ToQqjq +# FdGggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B # AQwFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD # VQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVk # IElEIFJvb3QgQ0EwHhcNMjIwODAxMDAwMDAwWhcNMzExMTA5MjM1OTU5WjBiMQsw @@ -683,31 +683,31 @@ # QS4xJDAiBgNVBAMTG0NlcnR1bSBDb2RlIFNpZ25pbmcgMjAyMSBDQQIQeAuTgzem # d0ILREkKU+Yq2jAJBgUrDgMCGgUAoHgwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKA # ADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYK -# KwYBBAGCNwIBFTAjBgkqhkiG9w0BCQQxFgQUV6EhlwY7IuRi00JFYWw8boC4lfMw -# DQYJKoZIhvcNAQEBBQAEggGAUDojVe8417DE75ffP2KS8wUFFsAsCdZoTV1g3QL7 -# rvAXVUv8oRHUwL7kcJ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qhOh1UYaG8Egsq2GDvzqTCPJn8A -# vOZSJ/nHQIWaOD4yJ0W8wB58lBaG0xz4JPUkB7IPy7qKTVvlglKnin46BSuYeDmi -# DKNl5apq +# SIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTI0MTAwMzIxNTMw +# OVowLwYJKoZIhvcNAQkEMSIEIPwwdpuJ2ABKl52p1uAcJMpkQs68ZSdY5O70qX+4 +# +OxhMA0GCSqGSIb3DQEBAQUABIICAAWowTStFrBeNfixaYJol83Z5XQM2fS718pf +# rn5MG2R+CWwPqFUW6WmKERpVw6Dt/rh51dU7VHZFUBoSiKez1QTR/Jux7fWsrIAC +# QOcIILj5H9y3s2IAWMxpcM89ys4d1MRhArU+4FrOdwNbHkOacdGheVeu06wvMnQC +# vktbfSrg4U29uAU/36EOgWPOE8faNAWmlAyvQ3KZza8WR8RI4FM8kgY3ifzq1S5D +# yo5ma9zivunH9njxhbq5RRTh3FX6Ri31N6mVpc7TPPJwx1cfj0l0Or9PqPjwLgw7 +# YKSKZ6Y7YzolepZ3q26aFKnjTXVDPtiofmM0PnyNJZ1/wJ3VSpJ37oljMSQP0ZRB +# l7BRZ7Uye1Chyv9RnZF88jC39OXmTSignUy5cEkn5DZq5XvrenBVJ8vHRRBxLio5 +# mQA2li1fQNG1WrQMB2nIzCifoYCP58IHmY9tBIzl8cl35BItwgtkdUCzIGwrGzhF +# r7XssschNLwqBXtVHfYZ5aeBev54x/ZDVoi2puLOcoBoiXY7SkKSROCvt6bqkDde +# MLU4UkidIuhDepDbdBkHncb/pTi4vSCiBUPc7rxc88hYxAyxi6p2UN12rZFPwCBq +# r5zsCOftXQmnFfNYZiqgh4VxgoB/fsI1B8jjRSVd5ZaIruHY/vs5LqLE1yenzoP7 +# axUi098s # SIG # End signature block From c4a5011c6c93f12d8796f757623d40b3c997ad35 Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:01:48 +0100 Subject: [PATCH 4/7] dev --- Public/Get-LatestOSBuild.ps1 | 57 ++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/Public/Get-LatestOSBuild.ps1 b/Public/Get-LatestOSBuild.ps1 index ff7bdf6..b4031b6 100644 --- a/Public/Get-LatestOSBuild.ps1 +++ b/Public/Get-LatestOSBuild.ps1 @@ -15,8 +15,9 @@ This parameter is mandatory. OS version number you want to check. Accepted values: Windows Client OS Versions: - CB/CBB/SAC (Semi-Annual Channel) - 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H2, 22H2, 23H2. - LTSB/LTSC (Long-Term Servicing Build/Channel) - 2015 = 1507, 2016 = 1607, 2019 = 1809, 2021 = 21H2. + CB/CBB/SAC (Semi-Annual Channel) - 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H2, 22H2, 23H2, 24H2. + Win 10 LTSB/LTSC (Long-Term Servicing Build/Channel) - 2015 = 1507, 2016 = 1607, 2019 = 1809, 2021 = 21H2. + Win 11 LTSC (Long-Term Servicing Channel) - 2024 = 24H2. Window Server OS Versions: SAC (Semi-Annual Channel) - 1709, 1803, 1809, 1903, 1909, 2004, 20H2. @@ -506,8 +507,8 @@ # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUw56sjJLGJUsXU0kJ33ToQqjq -# FdGggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU1/fqrOEf4aAJaafKOWgc0Ldv +# cYOggiAtMIIFjTCCBHWgAwIBAgIQDp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ki55tMO4q04GmZbhTsa0 +# x1Ij5gZhz/qgYXvDLaOW1Fh9k7jqVyIw9oAY/qZJm1/X9BqplZ22hmVCHPP8/19w +# lQf5LSDsqLMr/IbNYJeb40Ak9AotXxonfik1A41pZNsjmj8gmKag9/CaFZfsU9P8 +# zE9+1j4SQZ00oeoaa164OJ6bTk27CX2n4FgH8LkzGQqlJcXK8Mjb4VqIT+G12Pe4 +# kcZVPfOLR4Os4zwdf4OHJyrQSmkUpUrIjKfRYbCQSHshF/iK0hsCw3P56elG6U5V +# zP8A61xa3Ik6YSLMB0VRjMLaVylY+73USP3kU4IHJAJyyaEFM7yIoM/KbFYAJERp +# XCJ4oFaY0i71BtKcaAe8ODSr5koixNnLn8HQv9Y5iuPLEvaiAXtJVxJzr9NezjMb +# nDXoCCoIgRiNQQCoOvuGIM4QOzK1Wwl+lqojk5sOtLo76HUlcq5XV8m3S/Fr+Hep +# 7whADteo # SIG # End signature block From 61d5299636522ffee01e273a3fc9b1b4045e7553 Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Thu, 3 Oct 2024 23:07:39 +0100 Subject: [PATCH 5/7] dev --- CI/WindowOSBuild.Tests.ps1 | 62 +++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/CI/WindowOSBuild.Tests.ps1 b/CI/WindowOSBuild.Tests.ps1 index f21c387..11a6088 100644 --- a/CI/WindowOSBuild.Tests.ps1 +++ b/CI/WindowOSBuild.Tests.ps1 @@ -1,8 +1,3 @@ -BeforeAll { - $Path = (Get-Item $PsScriptRoot).parent.FullName + "\WindowsOSBuild.psm1" - . Import-Module -Name $Path -Verbose -} - # Function to check if a string contains a valid date in YYYY-MM-DD format function Find-ValidDate { param ( @@ -30,6 +25,11 @@ function Find-TrueOrFalse { return $Value -eq $true -or $Value -eq $false } +BeforeAll { + $Path = (Get-Item $PsScriptRoot).parent.FullName + "\WindowsOSBuild.psm1" + . Import-Module -Name $Path -Verbose +} + If ($PSVersionTable.PSVersion.Major -le 6) { Describe "PS - Get-LatestOSBuild" { Context "Win 10 (1507)" { @@ -904,8 +904,8 @@ Else { # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUnXLTc/O+Q+7nPjJEG0KPAZ0T -# 5TGggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B +# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUdsfdGbZL2pR7HrR1+/9R10eI +# LFuggiAtMIIFjTCCBHWgAwIBAgIQDpsYjvnQLefv21DiCEAYWjANBgkqhkiG9w0B # AQwFADBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD # VQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVk # IElEIFJvb3QgQ0EwHhcNMjIwODAxMDAwMDAwWhcNMzExMTA5MjM1OTU5WjBiMQsw @@ -1081,31 +1081,31 @@ Else { # QS4xJDAiBgNVBAMTG0NlcnR1bSBDb2RlIFNpZ25pbmcgMjAyMSBDQQIQeAuTgzem # d0ILREkKU+Yq2jAJBgUrDgMCGgUAoHgwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKA # ADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYK -# KwYBBAGCNwIBFTAjBgkqhkiG9w0BCQQxFgQUz7mJURBGp0BUPMB+q9psFxS+Zcww -# DQYJKoZIhvcNAQEBBQAEggGAdl2rBnjiCewf1eQmCbHdXZsoPObz2x63mOhFrbRL -# f2lPmKX219zlQt9Gw6mRsAKd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/YlaEK/9IKJYSSoakKzdLqiE2YnV+yX59k -# Nn+jDcLW2+ip6uSxyBl4yx/NtMBOyMUEBtsw/avPj3hxgGUI1/OctZzin+AQvcek -# edD7L5we +# SIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTI0MTAwMzIyMDcz +# MVowLwYJKoZIhvcNAQkEMSIEIMRa8xk4DksFuf+/ew6IdokTYbnGI/YJ1he8QCg5 +# Wq+UMA0GCSqGSIb3DQEBAQUABIICAHjJvi8am2+4xEqRo6mtqZ9WwUAOvMEeJqJF +# oBfdh7DI80+2FRnJPXufsqVcr3Xj8YkAGim5sUxrKK+AQjFUyj9Y4b50CHZH5u62 +# fz/WndEPtJ+VznnKiCs0mhuJYXbdgf8irrttPkfoyVQPoScCLx9ZCjIFFRm0xJhi +# 7g7pEbKySnaFH5wykDAsQqoiHLxBSCwJ8SAGSbVr0s5bSJAcbV/QIaeh+LavFo7o +# 7hD3wlJ8ES3J49Q96bTrX4RZ5/4JFMY8GwJ4T4pyMZ9KdmbUh7siaSOl853tXO4c +# QCcdyMB27ZmCqHrrfMKP7vyA97PgPkW8mgz+pFaYnSEuvGBUV60P1z5/tISUsVzw +# FQySIacSzm40rs8VtcyQt0/asPjh46jOXEXqWSh4s6Mb/9Ljnr2IuL4KhGAQilKU +# rl1VnUZmRS0+4dH9GeBwTLUCh01KWqPUx6QmYdQXOYxnoqLIPCAzyZubE9cAaEx0 +# LsYQO1q4kpM1fgCyR8ONdZTmGAjjrVUQz7Mn7+VkvnRlwwdH/76BhjJruORr8kku +# 4DCp4XIbvOFPwOJuEuLCfUzv20H9K37SV7kVL9HZSdCE1HsLBFZg8hVGce14LRbh +# IaNCdvayMwfIzm9dw24+K2djkzB7Dr/UaOEX5O6UH6IIBypb/PwSp5EJvLt9hv9O +# ZtHKI2kE # SIG # End signature block From e63eba042d2f917a2fc0ce12341e9e7e100b5cbf Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Fri, 4 Oct 2024 00:14:53 +0100 Subject: [PATCH 6/7] dev --- CI/WindowOSBuild.Tests.ps1 | 103 +++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 51 deletions(-) diff --git a/CI/WindowOSBuild.Tests.ps1 b/CI/WindowOSBuild.Tests.ps1 index 11a6088..e177727 100644 --- a/CI/WindowOSBuild.Tests.ps1 +++ b/CI/WindowOSBuild.Tests.ps1 @@ -1,33 +1,34 @@ -# Function to check if a string contains a valid date in YYYY-MM-DD format -function Find-ValidDate { - param ( - [string]$InputString - ) - # Trim whitespace from the input string - $InputString = $InputString.Trim() - - # Try to parse the date - try { - [datetime]::ParseExact($InputString, "yyyy-MM-dd", $null) | Out-Null - return $true - } catch { - return $false - } -} - -function Find-TrueOrFalse { - param ( - [object]$Value - ) - - # Return true if the value is either $true or $false - return $Value -eq $true -or $Value -eq $false -} BeforeAll { $Path = (Get-Item $PsScriptRoot).parent.FullName + "\WindowsOSBuild.psm1" . Import-Module -Name $Path -Verbose + + # Function to check if a string contains a valid date in YYYY-MM-DD format + Function Find-ValidDate { + Param ( + [string]$InputString + ) + # Trim whitespace from the input string + $InputString = $InputString.Trim() + + # Try to parse the date + Try { + [datetime]::ParseExact($InputString, "yyyy-MM-dd", $null) | Out-Null + Return $true + } + Catch { + Return $false + } + } + + Function Find-TrueOrFalse { + Param ( + [object]$Value + ) + # Return true if the value is either $true or $false + Return $Value -eq $true -or $Value -eq $false + } } If ($PSVersionTable.PSVersion.Major -le 6) { @@ -904,8 +905,8 @@ Else { # SIG # Begin signature block # MIImcgYJKoZIhvcNAQcCoIImYzCCJl8CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR -# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUdsfdGbZL2pR7HrR1+/9R10eI -# LFuggiAtMIIFjTCCBHWgAwIBAgI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tbpyDkG/fXTk7X3uBQiXltn3hFgviGEoWIyX8+tqjy +# KDZDUuLYXLdnmh5GpMC2/OQpf3RYoSe0sIjVMy7dFdUD7S6tgZQMgO0rfWFLfu4I +# YoRTB4odhFu6eKS2Ev+ylHt76nlcsPGOAjGd1yU8SGUR/AWtvuc89jTY/8QwvdZW +# yxdvDUSLYJ8mIXUSA5uGVcLRgZeSuY3nP0njUZkcJxt5VW/e5SpZmvf3XS9a2EPg +# KfcpZbCHdSYNkw56g/4FY92XHVz0tBJXokNRL+X7tpiiprTb8qB8qLW9B9TTMTKG +# HVlKQYsQK3ANht9DC53blNEZGgZ1wZ9EEYCwy8AyImEsKgp7HZUT5QDhWPb91qr9 +# F+1FSD0D8s1UiF+ZjeXueqmWQtbVOjSo9L1IUePeILTvH2klBUpClYAQuise8whC +# hOhnccZVvr4zObOlFa/M3VMVOAKTMG1XXOcFKtuOfpkqD/9UDtmEAsiocURoR4hZ +# HAavymvLQv9M9o20orfPl9lls+Ugq3fI6a50+dGadLO93euweLsEMXnJptUHEDbS +# C8w01Z/apx5oodr6qrdhbMI/Z9GORyYO3JPsLo+G3Zs+ou0gtrqY8hOje8quLs/K +# xRX4iFoq # SIG # End signature block From 6960de6392dc71d6139fd5c9cfc9016c61150894 Mon Sep 17 00:00:00 2001 From: Ashley How <28279067+AshleyHow@users.noreply.github.com> Date: Fri, 4 Oct 2024 00:29:54 +0100 Subject: [PATCH 7/7] dev --- README.md | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 3c1d6b8..88f3ffd 100644 --- a/README.md +++ b/README.md @@ -44,27 +44,28 @@ Gets windows patch release information (Build, KB Number, Release Date etc) for ### Parameters - OSName - -This parameter is optional. OS name you want to check. Default value is Win10. Supported accepted values: - -| OS Name | Version | -| :---------------------------------------------------| :-------------------------------------------------------------------------------------------- | -| Windows Client OS Names | Win10, Win11. | -| Windows Server OS Names | Server2016, Server2019, Server2022, Server2022Hotpatch, Server Semi-annual = ServerSAC. | + +This parameter is optional. OS name you want to check. Default value is Win10. Supported accepted values: + +| OS Name | Version | +| :---------------------------------------------------| :---------------------------------------------------------------------------------------------- | +| Windows Client OS Names | Win10, Win11. | +| Windows Server OS Names | Server2016, Server2019, Server2022, Server2022Hotpatch, Server Semi-annual = ServerSAC. | - OSVersion This parameter is mandatory. OS version number you want to check. Supported accepted values: -| Windows Client OS | Version | -| :-------------------------------------------------- | :-------------------------------------------------------------------------------------------- | -| CB/CBB/SAC (Semi-Annual Channel) | 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2, 23H2. | -| LTSB/LTSC (Long-Term Servicing Build/Channel) | 2015 = 1507, 2016 = 1607, 2019 = 1809, 2021 = 21H2. | +| Windows Client OS | Version | +| :-------------------------------------------------- | :---------------------------------------------------------------------------------------------- | +| CB/CBB/SAC (Semi-Annual Channel) | 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2, 23H2, 24H2. | +| Win 10 LTSB/LTSC (Long-Term Servicing Build/Channel)| 2015 = 1507, 2016 = 1607, 2019 = 1809, 2021 = 21H2. | +| Win 11 LTSC (Long-Term Servicing Channel) | 2024 = 24H2. | -| Windows Server OS | Version | -| :-------------------------------------------------- | :-------------------------------------------------------------------------------------------- | -| SAC (Semi-Annual Channel) | 1709, 1803, 1809, 1903, 1909, 2004, 20H2. | -| LTSB/LTSC (Long-Term Servicing Build/Channel) | 2016 = 1607, 2019 = 1809, 2022 = 21H2. | +| Windows Server OS | Version | +| :-------------------------------------------------- | :---------------------------------------------------------------------------------------------- | +| SAC (Semi-Annual Channel) | 1709, 1803, 1809, 1903, 1909, 2004, 20H2. | +| LTSB/LTSC (Long-Term Servicing Build/Channel) | 2016 = 1607, 2019 = 1809, 2022 = 21H2. | - LatestReleases @@ -89,17 +90,17 @@ This parameter is optional. Returns preview release/s only. - OutOfBandOnly This parameter is optional. Returns out-of-band/s only. - + ## Get-CurrentOSBuild Function Gets the currently installed OS Build release information. Supports Windows 10 and Windows Server 2016 onwards. Supports Hotpatch on Windows Server 2022 Azure Edition. Installed OS Build number or detailed information (Version, Build, Availability date, Hotpatch, Preview, Out-of-band, Servicing option, KB article, KB URL and Catalog URL). -### Parameters +### Parameters + + - Detailed - - Detailed - This parameter is optional. Returns detailed information about the installed OS Build. ## Usage @@ -148,7 +149,7 @@ Show only the latest available preview OS build for Windows 10 Version 22H2 in l ```powershell Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -PreviewOnly -BuildOnly ``` -Show only the latest available out-of-band OS build for for Windows 10 Version 22H2 in list format. +Show only the latest available out-of-band OS build for for Windows 10 Version 22H2 in list format. ```powershell Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -OutOfBandOnly -BuildOnly ``` @@ -166,7 +167,7 @@ Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 | ConvertTo-Json | Out-File .\Ge ### Get-CurrentOSBuild ```powershell -PS C:\Users\Ashley> Get-CurrentOSBuild +PS C:\Users\Ashley> Get-CurrentOSBuild 19045.3324 ```