Ignore virtual/remote display adapters when picking GPU name.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-10-27 20:14:44 +08:00
parent 6c81bcf26a
commit 683d0f242f

View File

@@ -73,7 +73,10 @@ function Get-CpuPct {
function Get-GpuName {
$gpus = Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue |
Where-Object { $_.Name -and $_.Name -notmatch 'Microsoft Basic|Remote Desktop' }
Where-Object {
$_.Name -and
$_.Name -notmatch 'Microsoft Basic|Remote Desktop|Oray|IddDriver|Virtual|Parsec|TeamViewer|VNC|Indirect'
}
if (-not $gpus) { return "GPU" }
$pick = $gpus | Where-Object { $_.Name -match 'NVIDIA|GeForce|RTX|GTX|Radeon|AMD' } |
Select-Object -First 1