mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-01 18:42:35 -05:00
Added New Dark Themes for Low Spec PC and added GPU Detection
This commit is contained in:
29
functions/private/Invoke-WinUtilGPU.ps1
Normal file
29
functions/private/Invoke-WinUtilGPU.ps1
Normal file
@ -0,0 +1,29 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user