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 4
4
# Returns 'Not Windows 11 Ready' if any of the checks fail, and returns 'Windows 11 Ready' if they all pass.
5
5
# Useful if running in an automation policy and want to populate a custom field of all agents with their readiness.
6
6
# 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
7
8
#
8
9
# =============================================================================================================================
9
10
10
- # Check Windows Version
11
11
$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
12
21
$winVersion = [System.Version ]$osInfo.Version
13
22
14
23
if ($winVersion -ge [System.Version ]::new(10 , 0 , 22000 )) {
@@ -493,4 +502,4 @@ if (0 -eq $outObject.returncode) {
493
502
else {
494
503
" Not Windows 11 Ready | "
495
504
Write-Output $outObject.returnReason
496
- }
505
+ }
You can’t perform that action at this time.
0 commit comments