Check Screen Resolution with PowerShell
Read the resolution of every connected monitor via the .NET Screen class — handy over RDP where the Display settings page misleads.
01Command
$ Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Screen]::AllScreens | Format-Table DeviceName, @{n='Resolution';e={$_.Bounds.Width.ToString()+'x'+$_.Bounds.Height}}, Primary02What it does
Over remote desktop or in scripts, this answers "what resolution is that monitor actually running?" without opening Display settings, and reveals the full multi-monitor layout: each Screen object carries Bounds (position and size), WorkingArea (minus taskbar), and a Primary flag. There is no built-in PowerShell cmdlet for this, which is why the .NET class is the standard trick. The values are the raw pixel geometry Windows reports; DPI scaling factors are not applied, so a 150%-scaled 1920x1080 panel still reports 1920x1080. For changing resolution programmatically you'd need the ChangeDisplaySettings API — this one-liner is for reading, not writing.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- Screen class (System.Windows.Forms)Evidence: Documents the Screen class with AllScreens, PrimaryScreen, Bounds, and DeviceName members used to read display geometry.
Last verified: 2026-09-18 · Category: System & Settings
06Related solutions
Search inside text files and logs with regex, returning file, line number and match.
Create or update a .zip from any files or folder contents straight from PowerShell.
A built-in PowerShell one-liner that answers 'is port 5432/3389/443 actually open through this network?' — no telnet client needed.