Ignore virtual/remote display adapters when picking GPU name.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -73,7 +73,10 @@ function Get-CpuPct {
|
|||||||
|
|
||||||
function Get-GpuName {
|
function Get-GpuName {
|
||||||
$gpus = Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue |
|
$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" }
|
if (-not $gpus) { return "GPU" }
|
||||||
$pick = $gpus | Where-Object { $_.Name -match 'NVIDIA|GeForce|RTX|GTX|Radeon|AMD' } |
|
$pick = $gpus | Where-Object { $_.Name -match 'NVIDIA|GeForce|RTX|GTX|Radeon|AMD' } |
|
||||||
Select-Object -First 1
|
Select-Object -First 1
|
||||||
|
|||||||
Reference in New Issue
Block a user