mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 06:35:51 -06:00
29 lines
772 B
PowerShell
29 lines
772 B
PowerShell
|
function Invoke-GPUCheck {
|
||
|
$gpuInfo = Get-WmiObject Win32_VideoController
|
||
|
|
||
|
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*") {
|
||
|
return $true # AMD GPU Found
|
||
|
}
|
||
|
}
|
||
|
foreach ($gpu in $gpuInfo) {
|
||
|
$gpuName = $gpu.Name
|
||
|
if ($gpuName -like "*UHD*") {
|
||
|
return $false # Intel Intergrated GPU Found
|
||
|
}
|
||
|
}
|
||
|
foreach ($gpu in $gpuInfo) {
|
||
|
$gpuName = $gpu.Name
|
||
|
if ($gpuName -like "*AMD Radeon(TM)*") {
|
||
|
return $false # AMD Intergrated GPU Found
|
||
|
}
|
||
|
}
|
||
|
}
|