mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-03 19:44:55 -06:00
0ba0654a2e
* Update close-old-issues.yaml * Compile Winutil * Update close-old-issues.yaml * Update close-old-issues.yaml * Update close-old-issues.yaml * Added New Dark Themes for Low Spec PC and added GPU Detection * Compile Winutil --------- Co-authored-by: Chris Titus <dfm.titus@gmail.com> Co-authored-by: ChrisTitusTech <ChrisTitusTech@users.noreply.github.com> Co-authored-by: Chris Titus <contact@christitus.com>
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
|
|
}
|
|
}
|
|
} |