# DontLag hardware scan (Windows PowerShell 5+ / PowerShell 7). # Reads your processor, graphics card, memory and main display, then opens https://dontlag.com/detect with those names; the site # matches them to its parts list and saves your rig in a cookie in your browser. It sends nothing anywhere else and installs nothing. Read it before running: https://dontlag.com/scan $ErrorActionPreference = 'SilentlyContinue' $cpu = (Get-CimInstance Win32_Processor | Select-Object -First 1).Name $cpu = ($cpu -replace '\s+', ' ').Trim() # Skip virtual and remote adapters; prefer a dedicated card over integrated graphics. $adapters = @(Get-CimInstance Win32_VideoController | Where-Object { $_.Name -notmatch 'Basic|Virtual|Remote|Parsec|Meta|Mirage|Citrix|DisplayLink' }) $gpu = $adapters | Sort-Object @{ Expression = { if ($_.Name -match 'NVIDIA|Radeon RX|Radeon Pro|Arc\(TM\) [AB]|Arc [AB]') { 0 } else { 1 } } } | Select-Object -First 1 # The active display can hang off another adapter (laptops), so take the highest values any adapter reports. $w = ($adapters | Measure-Object CurrentHorizontalResolution -Maximum).Maximum $h = ($adapters | Measure-Object CurrentVerticalResolution -Maximum).Maximum $hz = ($adapters | Measure-Object CurrentRefreshRate -Maximum).Maximum $ramBytes = (Get-CimInstance Win32_PhysicalMemory | Measure-Object Capacity -Sum).Sum $ram = [math]::Round($ramBytes / 1GB) # Fastest drive type in the PC (NVMe > SSD > HDD). $disks = @(Get-PhysicalDisk) $disk = if ($disks | Where-Object { $_.BusType -eq 'NVMe' }) { 'nvme' } elseif ($disks | Where-Object { $_.MediaType -eq 'SSD' }) { 'ssd' } elseif ($disks) { 'hdd' } else { '' } $query = @( 'cpu=' + [uri]::EscapeDataString("$cpu"), 'gpu=' + [uri]::EscapeDataString("$($gpu.Name)"), "ram=$ram", "w=$w", "h=$h", "hz=$hz", "disk=$disk" ) -join '&' Write-Host '' Write-Host ' DontLag found:' -ForegroundColor Green Write-Host " CPU $cpu" Write-Host " GPU $($gpu.Name)" Write-Host " RAM $ram GB" Write-Host " Screen ${w} x ${h} @ ${hz} Hz" Write-Host '' Write-Host ' Opening DontLag in your browser...' Start-Process "https://dontlag.com/detect?$query"