Skip to content

Commit 45eacf3

Browse files
Merge pull request #269 from officialJCReyes/patch-1
Update Win_Win11_Ready.ps1
2 parents adcbc33 + e06db65 commit 45eacf3

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

scripts/Win_Win11_Ready.ps1

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
#
88
#=============================================================================================================================
99

10+
# Check Windows Version
11+
$osInfo = Get-WmiObject -Class Win32_OperatingSystem
12+
$winVersion = [System.Version]$osInfo.Version
13+
14+
if ($winVersion -ge [System.Version]::new(10, 0, 22000)) {
15+
Write-Output "Already Windows 11"
16+
Exit 0
17+
}
18+
19+
# Continue with Windows 11 readiness check
20+
1021
$exitCode = 0
1122

1223
[int]$MinOSDiskSizeGB = 64
@@ -480,6 +491,6 @@ if (0 -eq $outObject.returncode) {
480491
"Windows 11 Ready"
481492
}
482493
else {
483-
"Not Windows 11 Ready"
494+
"Not Windows 11 Ready | "
484495
Write-Output $outObject.returnReason
485496
}

0 commit comments

Comments
 (0)