WDDG & WDCG HW readiness tool: typo & Arch Locale

Description:

As pointed out in ticket #5972 (closed) and #6574 (my ticket),
the script on this page stops working in localized versions of Windows
(Dutch mentioned in ticket #5972 specifically). This is caused by the
difference in how the strings "64-bit" and "32-bit" occur in non-English
localized versions of Windows.

Thanks to RvdHout (Ruud van den Hout) for suggesting the regex solution.

Changes proposed:
- $OSArch.Contains("64-bit") -> $OSArch -match ("64\-?\s?bits?")
- $OSArch.Contains("32-bit") -> $OSArch -match ("32\-?\s?bits?")
- Readiness Tool Version updated to 3.7.2 (thanks to RvdHout)
- Typo "archictecture" corrected to architecture (2 occurrences)
- Remove all redundant end-of-line (EOL) whitespace (blanks)
- Reduce number of blank lines before the signature block, from 3 to 2
- Add back a blank line between the metadata section and the page title

Ticket closure or reference:

Closes #6574

Ref. #5690 #5723 #6054 #6055
Ref. #5972 (closed)
This commit is contained in:
illfated
2020-04-25 19:59:46 +02:00
parent f49df66ee2
commit e25231e6ff

View File

@ -14,11 +14,13 @@ ms.collection: M365-identity-device-management
ms.topic: article
ms.reviewer:
---
# Windows Defender Device Guard and Windows Defender Credential Guard hardware readiness tool
```powershell
# Script to find out if machine is Device Guard compliant
# requires driver verifier on system.
# Script to find out if a machine is Device Guard compliant.
# The script requires a driver verifier present on the system.
param([switch]$Capable, [switch]$Ready, [switch]$Enable, [switch]$Disable, $SIPolicyPath, [switch]$AutoReboot, [switch]$DG, [switch]$CG, [switch]$HVCI, [switch]$HLK, [switch]$Clear, [switch]$ResetVerifier)
$path = "C:\DGLogs\"
@ -774,13 +776,13 @@ function CheckOSArchitecture
{
$OSArch = $(gwmi win32_operatingsystem).OSArchitecture.ToLower()
Log $OSArch
if($OSArch.Contains("64-bit"))
if($OSArch -match ("64\-?\s?bits?"))
{
LogAndConsoleSuccess "64 bit archictecture"
LogAndConsoleSuccess "64 bit architecture"
}
elseif($OSArch.Contains("32-bit"))
elseif($OSArch -match ("32\-?\s?bits?"))
{
LogAndConsoleError "32 bit archictecture"
LogAndConsoleError "32 bit architecture"
$DGVerifyCrit.AppendLine("32 Bit OS, OS Architecture failure.") | Out-Null
}
else
@ -959,7 +961,7 @@ function PrintToolVersion
LogAndConsole ""
LogAndConsole "###########################################################################"
LogAndConsole ""
LogAndConsole "Readiness Tool Version 3.7.1 Release. `nTool to check if your device is capable to run Device Guard and Credential Guard."
LogAndConsole "Readiness Tool Version 3.7.2 Release. `nTool to check if your device is capable to run Device Guard and Credential Guard."
LogAndConsole ""
LogAndConsole "###########################################################################"
LogAndConsole ""
@ -1371,7 +1373,6 @@ if($Capable)
}
# SIG # Begin signature block
## REPLACE
# SIG # End signature block