From cf6b4bdf3a87ad71bd369f2afd023329bfaa67cd Mon Sep 17 00:00:00 2001 From: Justawildwolf Date: Thu, 27 Jun 2024 06:34:32 +0800 Subject: [PATCH] Update Invoke-WinUtilGPU.ps1 --- functions/private/Invoke-WinUtilGPU.ps1 | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/functions/private/Invoke-WinUtilGPU.ps1 b/functions/private/Invoke-WinUtilGPU.ps1 index e5436f82..38f5594d 100644 --- a/functions/private/Invoke-WinUtilGPU.ps1 +++ b/functions/private/Invoke-WinUtilGPU.ps1 @@ -1,13 +1,30 @@ function Invoke-WinUtilGPU { $gpuInfo = Get-CimInstance Win32_VideoController - + + foreach ($gpu in $gpuInfo) { + $gpuName = $gpu.Name + if ($gpuName -like "*NVIDIA GeForce*M*") { + return $false # NVIDIA M series GPU found + } + } + foreach ($gpu in $gpuInfo) { + $gpuName = $gpu.Name + if ($gpuName -like "*NVIDIA GeForce*Laptop*") { + return $false # NVIDIA Laptop series GPU found + } + } + foreach ($gpu in $gpuInfo) { + $gpuName = $gpu.Name + if ($gpuName -like "*NVIDIA GeForce*GT*") { + return $false # NVIDIA GT series GPU found + } + } foreach ($gpu in $gpuInfo) { $gpuName = $gpu.Name if ($gpuName -like "*NVIDIA*") { return $true # NVIDIA GPU found } } - foreach ($gpu in $gpuInfo) { $gpuName = $gpu.Name if ($gpuName -like "*AMD Radeon RX*") {