Oh Damn, it seems to be a hard challange.
Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Screen]::AllScreens |
ForEach-Object { '{0} x {1}' -f $_.Bounds.Width, $_.Bounds.Height }
Show:
PS C:\WINDOWS\System32> Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.Screen]::AllScreens | ForEach-Object { '{0} x {1}' -f $.Bounds.Width, $.Bounds.Height }
2560 x 1600 2880 x 1620
And
$height = (((Get-WmiObject -Class Win32_VideoController).VideoModeDescription -split '\n')[0] -split ' ')[2]
$width = (((Get-WmiObject -Class Win32_VideoController).VideoModeDescription -split '\n')[0] -split ' ')[0]
echo $width, $height
Show:
$height = (((Get-WmiObject -Class Win32_VideoController).VideoModeDescription -split '\n')[0] -split ' ')1 $width = (((Get-WmiObject -Class Win32_VideoController).VideoModeDescription -split '\n')[0] -split ' ')[0] echo $width, $height 1920 1200
in that order:
@mkelement I'll try the third Party later.
Thanks for help till now. Other ideas?