{"id":14063548,"url":"https://github.com/AshleyHow/WindowsOSBuild","last_synced_at":"2025-07-29T15:34:00.282Z","repository":{"id":37790754,"uuid":"339212937","full_name":"AshleyHow/WindowsOSBuild","owner":"AshleyHow","description":"Windows patch release information (Version, Build, Availability date, Hotpatch, Preview, Out-of-band, Servicing option, KB article, KB URL and Catalog URL) for Windows client and server versions. Useful for scripting and automation purposes. Supports Windows 10 and Windows Server 2016 onwards. Supports Hotpatch on Windows Server 2022 Azure Edition.","archived":false,"fork":false,"pushed_at":"2024-10-03T23:36:16.000Z","size":2639,"stargazers_count":52,"open_issues_count":1,"forks_count":15,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-26T17:50:44.672Z","etag":null,"topics":["patching","powershell","powershell-module"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AshleyHow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["AshleyHow"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2021-02-15T21:33:06.000Z","updated_at":"2024-10-25T14:27:05.000Z","dependencies_parsed_at":"2023-11-29T00:27:24.161Z","dependency_job_id":"0767c3cd-0039-439f-b3e1-a5c718b8777d","html_url":"https://github.com/AshleyHow/WindowsOSBuild","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshleyHow%2FWindowsOSBuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshleyHow%2FWindowsOSBuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshleyHow%2FWindowsOSBuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AshleyHow%2FWindowsOSBuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AshleyHow","download_url":"https://codeload.github.com/AshleyHow/WindowsOSBuild/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228028484,"owners_count":17858340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["patching","powershell","powershell-module"],"created_at":"2024-08-13T07:03:23.579Z","updated_at":"2025-07-29T15:34:00.269Z","avatar_url":"https://github.com/AshleyHow.png","language":"PowerShell","funding_links":["https://github.com/sponsors/AshleyHow"],"categories":["PowerShell"],"sub_categories":[],"readme":"# WindowsOSBuild\r\n[![License][license-badge]][license]\r\n[![PowerShell Gallery][psgallery-badge]][psgallery]\r\n[![PowerShell Gallery Version][psgallery-version-badge]][psgallery]\r\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/ec81538145f64de7ad264606ed790407)](https://www.codacy.com/gh/AshleyHow/WindowsOSBuild/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=AshleyHow/WindowsOSBuild\u0026amp;utm_campaign=Badge_Grade)\r\n[![Build status](https://ci.appveyor.com/api/projects/status/o8l8510lkoo7igy1?svg=true)](https://ci.appveyor.com/project/ah-uk/windowsosbuild)\r\n\r\n![alt text](https://github.com/AshleyHow/WindowsOSBuild/blob/main/WindowsOSBuild.png)\r\n\r\nGets Windows patch release information (Version, Build, Availability date, Hotpatch, Preview, Out-of-band, Servicing option, KB article, KB URL and Catalog URL) for Windows client and server versions. Useful for scripting and automation purposes. Supports Windows 10 and Windows Server 2016 onwards. Supports Hotpatch on Windows 11, Windows Server 2022 and Windows Server 2025.\r\n\r\nPatch information retrieved from Microsoft Release Health / Update History and relevant Atom feed pages (Preview, Out-of-Band and Hotpatch info) outputted in a usable format. These sources are updated regularly by Microsoft AFTER new patches are released. This means at times this info may not always be in sync with Windows Update.\r\n\r\nIf you have found this project useful please [:heart:Sponsor](https://github.com/sponsors/AshleyHow) to help fund the renewal of the code signing certificate for the next year.\r\n\r\n## Installing the Module\r\n\r\n### PowerShell Support\r\n\r\nWindowsOSBuild supports Windows PowerShell 5.0, 5.1 and 7.0+.\r\n\r\n### Install from the PowerShell Gallery\r\n\r\nThe WindowsOSBuild module is published to the PowerShell Gallery and can be found here: [WindowsOSBuild](https://www.powershellgallery.com/packages/WindowsOSBuild/). This is the best and recommend method to install WindowsOSBuild.\r\n\r\nThe module can be installed from the gallery with:\r\n\r\n```powershell\r\nInstall-Module -Name WindowsOSBuild\r\n```\r\n\r\n### Updating the Module\r\n\r\nIf you have installed a previous version of the module from the gallery, you can install the latest update with `Update-Module` and the `-Force` parameter:\r\n\r\n```powershell\r\nUpdate-Module -Name WindowsOSBuild -Force\r\n```\r\n\r\n## Get-LatestOSBuild Function\r\n\r\nGets windows patch release information (Build, KB Number, Release Date etc) for Windows client and server versions. Useful for scripting and automation purposes. Supports Windows 10 and Windows Server 2016 onwards. Supports Hotpatch on Windows 11, Windows Server 2022 and Windows Server 2025.\r\n\r\n### Parameters\r\n\r\n  - OSName\r\n\r\nThis parameter is optional. OS name you want to check. Default value is Win10. Supported accepted values:\r\n\r\n| OS Name                                   | Version                                                                                                                 |\r\n| :-----------------------------------------| :-----------------------------------------------------------------------------------------------------------------------|\r\n| Windows Client OS Names                   | Win10, Win11, Win11Hotpatch.                                                                                            |\r\n| Windows Server OS Names                   | Server2016, Server2019, Server2022, Server2022Hotpatch, Server2025, Server2025Hotpatch, Server Semi-annual = ServerSAC. |\r\n\r\n  - OSVersion\r\n\r\nThis parameter is mandatory. OS version number you want to check. Supported accepted values:\r\n\r\n| Windows Client OS                          | Version                                                                                                                 |\r\n| :----------------------------------------- | :-----------------------------------------------------------------------------------------------------------------------|\r\n| CB/CBB/SAC (Semi-Annual Channel)           | 1507, 1511, 1607, 1703, 1709, 1803, 1809, 1903, 1909, 2004, 20H2, 21H1, 21H2, 22H2, 23H2, 24H2.                         |\r\n| Win 10 LTSB/LTSC                           | 2015 = 1507, 2016 = 1607, 2019 = 1809, 2021 = 21H2.                                                                     |\r\n| Win 11 LTSC                                | 2024 = 24H2.                                                                                                            |\r\n\r\n| Windows Server OS                          | Version                                                                                                                 |\r\n| :----------------------------------------- | :-----------------------------------------------------------------------------------------------------------------------|\r\n| SAC (Semi-Annual Channel)                  | 1709, 1803, 1809, 1903, 1909, 2004, 20H2.                                                                               |\r\n| LTSB/LTSC                                  | 2016 = 1607, 2019 = 1809, 2022 = 21H2, 2025 = 24H2.                                                                     |\r\n\r\n  - LatestReleases\r\n\r\nThis parameter is optional. Returns last x releases (where x is the number of releases you want to display). Default value is 1.\r\n\r\n  - BuildOnly\r\n\r\nThis parameter is optional. Returns only the full build number/s of the OS Version.\r\n\r\n  - ExcludePreview\r\n\r\nThis parameter is optional. Excludes preview releases.\r\n\r\n  - ExcludeOutOfBand\r\n\r\nThis parameter is optional. Excludes out-of-band releases.\r\n\r\n  - PreviewOnly\r\n\r\nThis parameter is optional. Returns preview release/s only.\r\n\r\n  - OutOfBandOnly\r\n\r\nThis parameter is optional. Returns out-of-band/s only.\r\n\r\n## Get-CurrentOSBuild Function\r\n\r\nGets the currently installed OS Build release information. Supports Windows 10 and Windows Server 2016 onwards. Supports Hotpatch on Windows Server 2022 Azure Edition.\r\n\r\nInstalled OS Build number or detailed information (Version, Build, Availability date, Hotpatch, Preview, Out-of-band, Servicing option, KB article, KB URL and Catalog URL).\r\n\r\n### Parameters\r\n\r\n   - Detailed\r\n\r\nThis parameter is optional. Returns detailed information about the installed OS Build.\r\n\r\n## Usage\r\n\r\n### Get-CurrentOSBuild\r\n\r\nShow only the build number for the installed OS Build.\r\n```powershell\r\nGet-CurrentOSBuild\r\n```\r\nShow detailed information for the installed OS Build.\r\n```powershell\r\nGet-CurrentOSBuild -Detailed\r\n```\r\n### Get-LatestOSBuild\r\n\r\nShow all information on the latest available OS build for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2\r\n```\r\nShow all information on the latest 2 releases of OS builds for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -LatestReleases 2\r\n```\r\nShow all information on the latest 2 releases excluding preview of OS builds for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -ExcludePreview -LatestReleases 2\r\n```\r\nShow all information on the latest 2 releases excluding out-of-band of OS builds for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -ExcludeOutOfBand -LatestReleases 2\r\n```\r\nShow all information on the latest 2 preview releases of OS builds for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -PreviewOnly -LatestReleases 2\r\n```\r\nShow all information on the latest 2 out-of-band releases of OS builds for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -OutOfBandOnly -LatestReleases 2\r\n```\r\nShow only the latest available OS build for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -BuildOnly\r\n```\r\nShow only the latest available preview OS build for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -PreviewOnly -BuildOnly\r\n```\r\nShow only the latest available out-of-band OS build for for Windows 10 Version 22H2 in list format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 -OutOfBandOnly -BuildOnly\r\n```\r\nShow all information on the latest available OS build for Windows 10 Version 22H2 in json format.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 | ConvertTo-Json\r\n```\r\nSave the json format to a file on the latest available OS build for Windows 10 Version 22H2.\r\n```powershell\r\nGet-LatestOSBuild -OSName Win10 -OSVersion 22H2 | ConvertTo-Json | Out-File .\\Get-LatestOSBuild.json\r\n```\r\n\r\n## Output\r\n\r\n### Get-CurrentOSBuild\r\n\r\n```powershell\r\nPS C:\\Users\\Ashley\u003e Get-CurrentOSBuild\r\n\r\n19045.3324\r\n```\r\n\r\n```powershell\r\nPS C:\\Users\\Ashley\u003e Get-CurrentOSBuild -Detailed\r\n\r\nVersion           : Version 22H2 (OS build 19045)\r\nBuild             : 19045.3324\r\nAvailability date : 2023-08-08\r\nPreview           : False\r\nOut-of-band       : False\r\nServicing option  : General Availability Channel\r\nKB article        : KB5029244\r\nKB URL            : https://support.microsoft.com/help/5029244\r\nCatalog URL       : https://www.catalog.update.microsoft.com/Search.aspx?q=KB5029244\r\n```\r\n### Get-LatestOSBuild\r\n\r\n```powershell\r\nPS C:\\Users\\Ashley\u003e Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -LatestReleases 2 -BuildOnly\r\n\r\n19045.3393\r\n19045.3324\r\n```\r\n\r\n```powershell\r\nPS C:\\Users\\Ashley\u003e Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -LatestReleases 2\r\n\r\nVersion           : Version 22H2 (OS build 19045)\r\nBuild             : 19045.3393\r\nAvailability date : 2023-08-22\r\nPreview           : True\r\nOut-of-band       : False\r\nServicing option  : General Availability Channel\r\nKB article        : KB5029331\r\nKB URL            : https://support.microsoft.com/help/5029331\r\nCatalog URL       : https://www.catalog.update.microsoft.com/Search.aspx?q=KB5029331\r\n\r\nVersion           : Version 22H2 (OS build 19045)\r\nBuild             : 19045.3324\r\nAvailability date : 2023-08-08\r\nPreview           : False\r\nOut-of-band       : False\r\nServicing option  : General Availability Channel\r\nKB article        : KB5029244\r\nKB URL            : https://support.microsoft.com/help/5029244\r\nCatalog URL       : https://www.catalog.update.microsoft.com/Search.aspx?q=KB5029244\r\n```\r\n\r\n```powershell\r\nPS C:\\Users\\Ashley\u003e Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -LatestReleases 20 | Format-Table\r\n\r\nVersion                       Build      Availability date Preview Out-of-band Servicing option                    KB article KB URL                                     Catalog URL\r\n-------                       -----      ----------------- ------- ----------- ----------------                    ---------- ------                                     -----------\r\nVersion 21H2 (OS build 19044) 19044.3324 2023-08-08        False   False       LTSC • General Availability Channel KB5029244  https://support.microsoft.com/help/5029244 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5029244\r\nVersion 21H2 (OS build 19044) 19044.3208 2023-07-11        False   False       LTSC • General Availability Channel KB5028166  https://support.microsoft.com/help/5028166 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5028166\r\nVersion 21H2 (OS build 19044) 19044.3086 2023-06-13        False   False       LTSC • General Availability Channel KB5027215  https://support.microsoft.com/help/5027215 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5027215\r\nVersion 21H2 (OS build 19044) 19044.2965 2023-05-09        False   False       LTSC • General Availability Channel KB5026361  https://support.microsoft.com/help/5026361 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5026361\r\nVersion 21H2 (OS build 19044) 19044.2846 2023-04-11        False   False       LTSC • General Availability Channel KB5025221  https://support.microsoft.com/help/5025221 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5025221\r\nVersion 21H2 (OS build 19044) 19044.2788 2023-03-21        True    False       LTSC • General Availability Channel KB5023773  https://support.microsoft.com/help/5023773 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5023773\r\nVersion 21H2 (OS build 19044) 19044.2728 2023-03-14        False   False       LTSC • General Availability Channel KB5023696  https://support.microsoft.com/help/5023696 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5023696\r\nVersion 21H2 (OS build 19044) 19044.2673 2023-02-21        True    False       LTSC • General Availability Channel KB5022906  https://support.microsoft.com/help/5022906 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5022906\r\nVersion 21H2 (OS build 19044) 19044.2604 2023-02-14        False   False       LTSC • General Availability Channel KB5022834  https://support.microsoft.com/help/5022834 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5022834\r\nVersion 21H2 (OS build 19044) 19044.2546 2023-01-19        True    False       LTSC • General Availability Channel KB5019275  https://support.microsoft.com/help/5019275 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5019275\r\nVersion 21H2 (OS build 19044) 19044.2486 2023-01-10        False   False       LTSC • General Availability Channel KB5022282  https://support.microsoft.com/help/5022282 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5022282\r\nVersion 21H2 (OS build 19044) 19044.2364 2022-12-13        False   False       LTSC • General Availability Channel KB5021233  https://support.microsoft.com/help/5021233 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5021233\r\nVersion 21H2 (OS build 19044) 19044.2311 2022-11-15        True    False       LTSC • General Availability Channel KB5020030  https://support.microsoft.com/help/5020030 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020030\r\nVersion 21H2 (OS build 19044) 19044.2251 2022-11-08        False   False       LTSC • General Availability Channel KB5019959  https://support.microsoft.com/help/5019959 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5019959\r\nVersion 21H2 (OS build 19044) 19044.2194 2022-10-28        False   True        LTSC • General Availability Channel KB5020953  https://support.microsoft.com/help/5020953 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020953\r\nVersion 21H2 (OS build 19044) 19044.2193 2022-10-25        True    False       LTSC • General Availability Channel KB5018482  https://support.microsoft.com/help/5018482 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5018482\r\nVersion 21H2 (OS build 19044) 19044.2132 2022-10-17        False   True        LTSC • General Availability Channel KB5020435  https://support.microsoft.com/help/5020435 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5020435\r\nVersion 21H2 (OS build 19044) 19044.2130 2022-10-11        False   False       LTSC • General Availability Channel KB5018410  https://support.microsoft.com/help/5018410 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5018410\r\nVersion 21H2 (OS build 19044) 19044.2075 2022-09-20        True    False       LTSC • General Availability Channel KB5017380  https://support.microsoft.com/help/5017380 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5017380\r\nVersion 21H2 (OS build 19044) 19044.2006 2022-09-13        False   False       LTSC • General Availability Channel KB5017308  https://support.microsoft.com/help/5017308 https://www.catalog.update.microsoft.com/Search.aspx?q=KB5017308\r\n```\r\n\r\n## How to compare current vs latest OS build\r\n\r\nTo compare you can use the following code example. This will compare a device's current OS build against the latest available OS build of Windows 10 22H2 (including out-of-band and excluding preview builds) this can be changed as required and guidance can be found above. The $Status variable can used in your RMM, monitoring solution or scripts as required.\r\n\r\n```powershell\r\n$InstalledOSBuild = Get-CurrentOSBuild\r\n$LatestOSBuilds = Get-LatestOSBuild -OSName Win10 -OSVersion 22H2 -LatestReleases 1 -ExcludePreview\r\n\r\nIf ($LatestOSBuilds -match $InstalledOSBuild) {\r\n    Write-Output \"OK - OS Build is up to date\"\r\n    $Status = \"OK\"\r\n}\r\nElse {\r\n    Write-Output \"Warning - OS Build is out of date\"\r\n    $Status = \"Warning\"\r\n}\r\n````\r\n\r\n## Who\r\n\r\nThis module is maintained by the following\r\n\r\n* Ashley How, [@AshleyHow1](https://twitter.com/AshleyHow1)\r\n\r\n## Credits\r\n\r\nForked from [Get-Windows10ReleaseInformation.ps1](https://github.com/FredrikWall/PowerShell/blob/master/Windows/Get-Windows10ReleaseInformation.ps1) created by [Fredrik Wall](https://github.com/FredrikWall)\r\n\r\n\r\nUses code adapted from [Get-CurrentPatchInfo.ps1](https://gist.githubusercontent.com/SMSAgentSoftware/79fb091a4b7806378fc0daa826dbfb47/raw/0f6b52cddf82b2aa836a813cf6bc910a52a48c9f/Get-CurrentPatchInfo.ps1) created by [Trevor Jones](https://github.com/SMSAgentSoftware)\r\n\r\n[psgallery-badge]: https://img.shields.io/powershellgallery/v/WindowsOSBuild.svg?logo=PowerShell\u0026style=flat-square\r\n[psgallery]: https://www.powershellgallery.com/packages/WindowsOSBuild\r\n[psgallery-version-badge]: https://img.shields.io/powershellgallery/dt/WindowsOSBuild.svg?logo=PowerShell\u0026style=flat-square\r\n[license-badge]: https://img.shields.io/github/license/AshleyHow/WindowsOSBuild.svg?style=flat-square\r\n[license]: https://github.com/AshleyHow/WindowsOSBuild/blob/main/LICENCE\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAshleyHow%2FWindowsOSBuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAshleyHow%2FWindowsOSBuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAshleyHow%2FWindowsOSBuild/lists"}