screens.ps1
screens.ps1
is a
PowerShell script that prints the connected monitors' dimensions and positions.
# V.2
add-type -assemblyName System.Windows.Forms
''
'Monitor Dimension Work Area Offset'
'------- --------- --------- -----------'
foreach ($screen in [System.Windows.Forms.Screen]::AllScreens) {
$wa = $screen.WorkingArea
'{0:-18} {1,4}x{2,4} {3,4}x{4,4} @ {5,5},{6,5}' -f $screen.DeviceName, $screen.Bounds.Width, $Screen.Bounds.Height, $wa.Width, $wa.Height, $wa.X, $wa.Y
}
''
Version 2 of the script shows both, the full dimensions and the working area's dimensions.
TODO
How does the output of this script related to
get-cimInstance -namespace root\wmi -className wmiMonitorBasicDisplayParams
get-wmiObject win32_VideoController | select caption,name,videoModeDescription,currentHorizontalResolution,currentVerticalResolution