{"id":9635,"date":"2024-05-15T08:06:11","date_gmt":"2024-05-15T08:06:11","guid":{"rendered":"https:\/\/cheapwindowsvps.com\/blog\/using-powershell-script-to-assess-windows-11-hardware-compatibility\/"},"modified":"2025-01-20T11:48:15","modified_gmt":"2025-01-20T11:48:15","slug":"using-powershell-script-to-assess-windows-11-hardware-compatibility","status":"publish","type":"post","link":"https:\/\/cheapwindowsvps.com\/blog\/using-powershell-script-to-assess-windows-11-hardware-compatibility\/","title":{"rendered":"Using PowerShell Script to Assess Windows 11 Hardware Compatibility"},"content":{"rendered":"<p>In this article, we&#8217;ll examine how to employ Microsoft&#8217;s official <strong>HardwareReadiness.ps1<\/strong> PowerShell script to run a bulk Windows 11 hardware compatibility check on domain computers.<\/p>\n<p>This script ascertains that the computer meets the following minimum criteria to run Windows 11:<\/p>\n<ul>\n<li>A compatible x64 processor (<a href=\"https:\/\/learn.microsoft.com\/en-us\/windows-hardware\/design\/minimum\/windows-processor-requirements\" target=\"_blank\" rel=\"nofollow noopener\">complete list of supported CPUs<\/a>)<\/li>\n<li>At least 4 GB of RAM<\/li>\n<li>A minimum of 64 GB hard drive size<\/li>\n<li>A device that has UEFI and Secure Boot enabled<\/li>\n<li>A video card that is compatible with DirectX 12 and has WDDM 2.0 drivers<\/li>\n<li>A TPM 2.0 module<\/li>\n<\/ul>\n<p>To manually verify if a specific machine&#8217;s hardware is in compliance with the requirements of Windows 11:<\/p>\n<ol>\n<li>Download the <b>HardwareReadiness.ps1<\/b> script by clicking <a href=\"https:\/\/aka.ms\/HWReadinessScript\" target=\"_blank\" rel=\"nofollow noopener\">here<\/a>.<\/li>\n<li>Launch an elevated Windows PowerShell console (this script utilizes the <code>Get-WMIObject<\/code> cmdlet, which is not supported in <a href=\"https:\/\/woshub.com\/install-update-powershell-windows\/\" target=\"_blank\" rel=\"nofollow noopener\">latest versions of PowerShell Core<\/a>)<\/li>\n<li>Activate PowerShell script execution in the existing session with the following command: <code>Set-ExecutionPolicy -Scope Process RemoteSigned<\/code><\/li>\n<li>Commence the script using the following command: <code>.HardwareReadiness.ps1<\/code><\/li>\n<\/ol>\n<p>Once executed, the script should return the code <b>0<\/b>. This indicates that your machine satisfies the hardware requirements for Windows 11 (the output would be <code>returncode:0 , returnresult=CAPABLE<\/code>).<\/p>\n<p>{&#8220;returnCode&#8221;:0,&#8221;returnReason&#8221;:&#8221;&#8221;,&#8221;logging&#8221;:&#8221;Storage: OSDiskSize=427GB. PASS; Memory: System_Memory=32GB. PASS; TPM: TPMVersion=2.0, 0, 1.38. PASS; Processor: {AddressWidth=64; MaxClockSpeed=3901; NumberOfLogicalCores=12; Manufacturer=AuthenticAMD; Caption=AMD64 Family 25 Model 80 Stepping 0; }. PASS; SecureBoot: Capable. PASS; &#8220;,&#8221;returnResult&#8221;:&#8221;CAPABLE&#8221;}<\/p>\n<p>If you need to conduct a large-scale Windows 11 compatibility check on enterprise computers, a feasible tool to use would be this PowerShell script. This Script effectively gathers information through mediums like SCCM, Intune, or even <a href=\"https:\/\/woshub.com\/wsus-deploy-third-party-software-updates\/\" target=\"_blank\" rel=\"nofollow noopener\">WSUS, whose capabilities extend to deploying third-party software and scripts<\/a>. In more straightforward scenarios, execution of this PowerShell script via Group Policies and <a href=\"https:\/\/woshub.com\/how-automatically-fill-computer-description-field-in-active-directory\/\" target=\"_blank\" rel=\"nofollow noopener\">storing the results in the properties of the computer object in Active Directory<\/a> proves to be sufficient.<\/p>\n<p>Keep in mind that the original source code of the script will need to be slightly adjusted.<\/p>\n<p>A point of note is that <a href=\"https:\/\/woshub.com\/how-to-sign-powershell-script-with-a-code-signing-certificate\/\" target=\"_blank\" rel=\"nofollow noopener\">this PowerShell script file is digitally signed<\/a> by Microsoft. It is however important to keep in mind that the signing certificate expired in 2022.<\/p>\n<p>Edit the HardwareReadness.ps1 file and append the provided snippet of code at its conclusion, specifically before #SIG # Begin signature block:<\/p>\n<p><code>$outObject = $outObject | ConvertTo-Json -Compress<br \/>\n$computer = $env:COMPUTERNAME<br \/>\n$ComputerSearcher = New-Object DirectoryServices.DirectorySearcher<br \/>\n$ComputerSearcher.SearchRoot = \"LDAP:\/\/DC=WOSHUB,DC=LOC\"<br \/>\n$ComputerSearcher.Filter = \"(&amp;(objectCategory=Computer)(CN=$Computer))\"<br \/>\n$computerObj = [ADSI]$ComputerSearcher.FindOne().Path<br \/>\n$computerObj.Put( \"Info\", $outObject )<br \/>\n$computerObj.SetInfo()<\/code><\/p>\n<p>This above PowerShell script completes the task of entering Windows 11 compatibility data into the &#8216;Info&#8217; computer attribute located within Active Directory.<\/p>\n<p>Ensure to copy the aforementioned PS1 script file into the directory labeled <code>\\woshub.locNetlogon<\/code> present on the domain controller.<\/p>\n<div>\n<p>Open the <a href=\"https:\/\/woshub.com\/group-policy-active-directory\/\" target=\"_blank\" rel=\"nofollow noopener\">Domain Group Policy Management console<\/a> (<code>gpmc.msc<\/code>), create a new GPO, and link it to the computer\u2019s OU.<\/p>\n<p>Navigate to <strong>Computer Configuration -&gt; Policies -&gt; Windows Settings -&gt; Scripts (Startup \/ Shutdown) -&gt; Startup -&gt; <\/strong>tab <strong>PowerShell Scripts<\/strong>, and specify the UNC path to the HardwareReadiness.ps1 script<\/p>\n<p>Go to Computer Configuration -&gt; Administrative Templates -&gt; System -&gt; Group Policy. Enable the policy <strong>Configure Logon Script Delay <\/strong>and set a <strong>1-minute<\/strong> script execution delay.<\/p>\n<\/div>\n<p>Also, enable the <strong>Always wait for the network at computer startup and logon <\/strong>option under Computer Configuration -&gt; Admin Templates -&gt; System -&gt; Logon.<\/p>\n<p>Read more about <a href=\"https:\/\/woshub.com\/running-powershell-startup-scripts-using-gpo\/\" target=\"_blank\" rel=\"nofollow noopener\">how to run logon PowerShell scripts via GPO<\/a>.<\/p>\n<p>Reboot the client\u2019s computer. Start the <a href=\"https:\/\/woshub.com\/install-active-directory-users-computers-aduc-console\/\" target=\"_blank\" rel=\"nofollow noopener\">ADUC console<\/a> (<code>dsa.msc<\/code>) and open the computer properties. Go to the <a href=\"https:\/\/woshub.com\/active-directory-attribute-editor\/\" target=\"_blank\" rel=\"nofollow noopener\"><strong>Attribute Editor<\/strong> tab<\/a> and check that the <strong>Info<\/strong> parameter now contains the results of checking your computer for Windows 11 compatibility. In the <a href=\"https:\/\/woshub.com\/active-directory-attribute-editor\/\" target=\"_blank\" rel=\"nofollow noopener\">Attribute Editor tab<\/a>, check that the <strong>Info<\/strong> parameter now contains the results of your computer\u2019s Windows 11 compatibility check.<\/p>\n<p>Once the logon script has been run on all computers, you can quickly view information about compatible and incompatible computers from Active Directory by using the <a href=\"https:\/\/woshub.com\/get-adcomputer-getting-active-directory-computers-info-via-powershell\/\" target=\"_blank\" rel=\"nofollow noopener\">Get-ADComputer<\/a> cmdlet:<\/p>\n<p><code>Get-ADComputer -Filter {enabled -eq \"true\"} -properties *| Where-Object {$_.info -ne $null}<\/code><\/p>\n<p>For more detailed information about incompatible computers and specific computer hardware that does not meet the Win 11 minimum requirements, run the following PowerShell script:<\/p>\n<pre>$Report = @()<\/pre>\n<p>$computers = Get-ADComputer -Filter {enabled -eq &#8220;true&#8221;} -properties *| Where-Object { $_.Info -match &#8216;&#8221;returnCode&#8221;:1&#8217;}<\/p>\n<p>foreach ($computer in $computers){<\/p>\n<p>$jsonString =$computer.info<\/p>\n<p>$object = $jsonString | ConvertFrom-Json<\/p>\n<p>$returnReasonValues = $object.returnReason -split &#8216;, &#8216;<\/p>\n<p>$CompInfo = [PSCustomObject]@{<\/p>\n<p>&#8220;Computer&#8221; = $computer.name<\/p>\n<p>&#8220;NonCompatibleItems&#8221; = $returnReasonValues<\/p>\n<p>}<\/p>\n<p>$Report += $CompInfo<\/p>\n<p>}<\/p>\n<p>$Report|fl<\/p>\n<div>The <a href=\"https:\/\/woshub.com\/powershell-read-modify-json-object\/\" target=\"_blank\" rel=\"nofollow noopener\">ConvertFrom-Json<\/a> cmdlet is used to convert data from JSON format.<\/div>\n<div>Currently, you can ignore <a href=\"https:\/\/woshub.com\/windows-11-unsupported-hardware-no-tpm-secure-boot\/\" target=\"_blank\" rel=\"nofollow noopener\">checking for TPM, Secure Boot, and other hardware requirements during a clean install of Windows 11<\/a> by using several registry options in the <strong>LabConfig<\/strong> key. And with the <strong>AllowUpgradesWithUnsupportedTPMorCPU<\/strong> key, you can <a href=\"https:\/\/woshub.com\/upgrade-to-windows-11-unsupported-pc\/\" target=\"_blank\" rel=\"nofollow noopener\">upgrade to Windows 11 even on computers with unsupported hardware<\/a>.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we&#8217;ll examine how to employ Microsoft&#8217;s official HardwareReadiness.ps1 PowerShell script to run a bulk Windows 11 hardware compatibility check on domain computers. This script ascertains that the computer meets the following minimum criteria to run Windows 11: A compatible x64 processor (complete list of supported CPUs) At least 4 GB of RAM [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9636,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[97,117,99],"tags":[],"class_list":["post-9635","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-active-directory","category-powershell","category-windows-11"],"_links":{"self":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/comments?post=9635"}],"version-history":[{"count":1,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9635\/revisions"}],"predecessor-version":[{"id":10484,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/posts\/9635\/revisions\/10484"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media\/9636"}],"wp:attachment":[{"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/media?parent=9635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/categories?post=9635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cheapwindowsvps.com\/blog\/wp-json\/wp\/v2\/tags?post=9635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}