Sure, you can run something like this:
321045-is-there-any-way-to-determine-the-monitor-size-attached-to-a-computer
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
I'm trying to figure out how to determine how many and what size monitors are connected to a computer running remotely at home, preferably using PowerShell at this moment. Following a Hey Scripting Guys blog post I've hit upon two approaches using wim32, wim32_VideoController and Wim32_DesktopMonitor. These are nice but they don't list all monitors on a system. Almost all of my users have two monitors at home.
Here's the simple script I'm using:
Get-WmiObject -Class "win32_videocontroller" -Namespace "root\CIMV2" -ComputerName $CompName
Get-WmiObject -Class "win32_desktopmonitor" -ComputerName $CompName
I can deduce the size of the monitor from the screen height/width or horizontal/vertical resolution depending which win32 class I am running.
My problem is that it is only returning information on 1 of the 2 monitors.
Any thoughts on how to get it to return all of the monitors attached to the system? Or, is there a better way to get this information that I haven't seen yet?
Thanks in advance!
Sure, you can run something like this:
321045-is-there-any-way-to-determine-the-monitor-size-attached-to-a-computer
Hi,
This command will return all the monitors for you
Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBasicDisplayParams
Use PowerShell to Discover Multi-Monitor Information
https://devblogs.microsoft.com/scripting/use-powershell-to-discover-multi-monitor-information/
Best Regards,
Ian
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.