Update Invoke-WinUtilGPU.ps1

This commit is contained in:
Justawildwolf 2024-06-27 06:34:32 +08:00
parent cb3b64e195
commit cf6b4bdf3a

View File

@ -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*") {