File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 44# Returns 'Not Windows 11 Ready' if any of the checks fail, and returns 'Windows 11 Ready' if they all pass.
55# Useful if running in an automation policy and want to populate a custom field of all agents with their readiness.
66# This is a modified version of the official Microsoft script here: https://aka.ms/HWReadinessScript
7+ # 9/10/2025 silversword411 v1.2 Adding server output
78#
89# =============================================================================================================================
910
10- # Check Windows Version
1111$osInfo = Get-WmiObject - Class Win32_OperatingSystem
12+
13+ # Check if the OS is a server version
14+ # ProductType=1 is Workstation, 2 is Domain Controller, 3 is Server.
15+ if ($osInfo.ProductType -ne 1 ) {
16+ Write-Output " $ ( $osInfo.Caption ) "
17+ Exit 0
18+ }
19+
20+ # Check Windows Version
1221$winVersion = [System.Version ]$osInfo.Version
1322
1423if ($winVersion -ge [System.Version ]::new(10 , 0 , 22000 )) {
@@ -493,4 +502,4 @@ if (0 -eq $outObject.returncode) {
493502else {
494503 " Not Windows 11 Ready | "
495504 Write-Output $outObject.returnReason
496- }
505+ }
You can’t perform that action at this time.
0 commit comments