[Windows] Add Windows 2025 code (#11037)

This commit is contained in:
Alexey-Ayupov
2024-11-29 11:08:29 +01:00
committed by GitHub
parent 6c768837be
commit e3ba729b37
25 changed files with 993 additions and 80 deletions

View File

@@ -307,6 +307,22 @@ function Get-TCToolVersionPath {
return Join-Path $foundVersion $Arch
}
function Test-IsWin25 {
<#
.SYNOPSIS
Checks if the current Windows operating system is Windows Server 2025.
.DESCRIPTION
This function uses the Get-CimInstance cmdlet to retrieve information
about the current Windows operating system. It then checks if the Caption
property of the Win32_OperatingSystem class contains the string "2025",
indicating that the operating system is Windows Server 2025.
.OUTPUTS
Returns $true if the current Windows operating system is Windows Server 2025.
Otherwise, returns $false.
#>
(Get-CimInstance -ClassName Win32_OperatingSystem).Caption -match "2025"
}
function Test-IsWin22 {
<#
.SYNOPSIS