private/Test-IsWindows1126H1.ps1

function Test-IsWindows1126H1 {
    <#
    .SYNOPSIS
        Tests whether the operating system is Windows 11 build 26800
 
    .DESCRIPTION
        Queries Win32_OperatingSystem through CIM and checks that Caption
        contains Windows 11 and BuildNumber equals 26800. Returns $false when
        CIM data is unavailable or either value does not match.
 
    .EXAMPLE
        PS> Test-IsWindows1126H1
 
        Tests whether the current operating system is Windows 11 build 26800.
 
    .INPUTS
        None. This function does not accept pipeline input.
 
    .OUTPUTS
        System.Boolean. Returns $true for Windows 11 build 26800; otherwise,
        returns $false.
 
    .NOTES
        Author: David Segura
        Company: Recast Software
        Version: 1.0.0
        Date: 2026-08-28
 
        The build check compares the BuildNumber string and does not inspect
        the update revision.
    #>

    [OutputType([bool])]
    param ()

    $os = Get-CimInstance -ClassName Win32_OperatingSystem -ErrorAction SilentlyContinue
    return ($null -ne $os -and $os.Caption -like '*Windows 11*' -and $os.BuildNumber -eq '26800')
}