Fetch correct GPU info
This commit is contained in:
@@ -65,7 +65,14 @@ $asciiLogo = switch ($Logo) {
|
||||
$computerSystem = Get-CimInstance Win32_ComputerSystem
|
||||
$os = Get-CimInstance Win32_OperatingSystem
|
||||
$cpu = Get-CimInstance Win32_Processor | Select-Object -First 1
|
||||
$gpu = Get-CimInstance Win32_VideoController | Select-Object -First 1
|
||||
# Get GPU - prefer discrete GPU over integrated
|
||||
$gpuList = Get-CimInstance Win32_VideoController | Where-Object { $_.Status -eq 'OK' -or $_.Availability -eq 3 }
|
||||
$gpu = $gpuList | Where-Object {
|
||||
$_.Name -match 'NVIDIA|AMD|Radeon|GeForce|RTX|GTX|RX\s*\d'
|
||||
} | Select-Object -First 1
|
||||
if (-not $gpu) {
|
||||
$gpu = $gpuList | Select-Object -First 1
|
||||
}
|
||||
$disk = Get-PSDrive -PSProvider FileSystem | Where-Object { $_.Name -eq 'C' }
|
||||
|
||||
# Calculate uptime
|
||||
|
||||
Reference in New Issue
Block a user