Great! If you want to list all display adapters and their current resolutions (instead of just the first one), we need to remove the -First 1 filter from the GPU section.
Here's the updated script with that change:
<# Get-HWSummary.ps1
Shows CPU, GPU(s), disk(s) and system uptime
#>
# --- CPU --------------------------------------------------------------------
$cpu = Get-CimInstance Win32_Processor |
Select-Object -First 1 `
@{N = 'Model' ; E = { $_.Name } },
@{N = 'Speed (GHz)' ; E = { [math]::Round($_.MaxClockSpeed/1000,2) } }
# --- GPU / Display ----------------------------------------------------------
$gpu = Get-CimInstance Win32_VideoController |
Select-Object `
@{N = 'Model' ; E = { $_.Name } },
@{N = 'Resolution' ; E = { "$($_.CurrentHorizontalResolution)x$($_.CurrentVerticalResolution)" } }
# --- Disks ------------------------------------------------------------------
$drives = Get-CimInstance Win32_DiskDrive |
Select-Object `
@{N = 'Model' ; E = { $_.Model } },
@{N = 'Capacity (GB)'; E = { [math]::Round($_.Size/1GB,2) } }
# --- Uptime -----------------------------------------------------------------
$boot = (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
$uptimeSpan = (Get-Date) - $boot
$uptime = '{0} Days {1} Hours {2} Minutes {3} Seconds' -f `
$uptimeSpan.Days, $uptimeSpan.Hours, $uptimeSpan.Minutes, $uptimeSpan.Seconds
# --- Output -----------------------------------------------------------------
Write-Host "`n==================== System Information ====================`n" -ForegroundColor Cyan
Write-Host "CPU:" -ForegroundColor Yellow
$cpu | Format-Table -AutoSize
Write-Host "`nDisplay Adapter(s):" -ForegroundColor Yellow
$gpu | Format-Table -AutoSize
Write-Host "`nHard Drive(s):" -ForegroundColor Yellow
$drives | Format-Table -AutoSize
Write-Host "`nUptime:" -ForegroundColor Yellow
Write-Host " $uptime`n"
Write-Host "============================================================`n" -ForegroundColor Cyan
✅ What Changed:
- Removed
Select-Object -First 1 in the GPU section so all video controllers are listed.
- This will now show multiple GPUs or integrated + discrete graphics setups correctly.
Example Output:
Display Adapter(s):
Model Resolution
----- ----------
Intel(R) UHD Graphics 1920x1080
NVIDIA GeForce RTX 3060 1920x1080
Let me know if you'd like it to include monitor names or refresh rates too!