How do I find my monitor's name in PowerShell?

May 12, 2025 4 answers
Asked by mortar_joint
I'm trying to identify the name of my monitor using PowerShell. I've noticed that when I go to System > Display > Advanced Display settings, I can see something like 'Display X: Connected to YOUR_MONITOR_NAME_HERE'. However, I really want to retrieve this monitor name directly through PowerShell without relying on its friendly name, as it doesn't seem to work for my monitor. Any suggestions on how I can do this?

Answers

2chainLinks
It might be worth looking into related classes to see if the monitor name is stored under different properties. You can use wildcards in your queries like this: ```powershell Get-CimClass -PropertyName *monitor* Get-CimClass -PropertyName *display* ``` This could give you a broader view of any related class that contains the details you need. One of the classes you might want to check is Win32_DesktopMonitor. Just a side note, your original code has quite a few steps baked in that could be simplified!
Reply to this answer
Wonklet
If youโ€™re looking for the monitor name specifically, you should look into using CIM/WMI queries. I remember seeing a post here recently that might help you get what you need. Just note that sometimes the friendly names might not be available for certain monitors.

7cm_hem: Yeah, WMI can show the friendly name, but it doesnโ€™t show up for mine either. It's kind of frustrating.

Reply to this answer
threaded-rod
You can try using the following PowerShell function that queries the WMI to get monitor information. This will return details like Manufacturer and Serial Number as well. Here's a snippet you can use: ```powershell Function Get-MonitorModel { param($Array) return -join [char[]]$Array } $Query = Get-WmiObject -Query "Select * FROM WMIMonitorID" -Namespace rootwmi $Results = $Query | ForEach-Object { New-Object PSObject -Property @{ Manufacturer = Get-MonitorModel($_.ManufacturerName) SerialNumber = Get-MonitorModel($_.SerialNumberID) } } $Results ``` This should work for multiple monitors and provide you with the crucial details you need!

west.gate.key: Awesome, this script worked perfectly for my setup and showed me details on all three monitors!

Reply to this answer
b4 dawn
You could try running this command to export all monitor properties to a text file: ```powershell Get-CimInstance -ClassName CIM_Display | Format-Custom -Property * | Out-File c:pathtofile.txt ``` Then check that file for any properties that match what you see in the GUI. It might help you locate the correct information you're after.

A...B: Unfortunately, I didn't find anything useful in the file.

west.gate.key: Isn't display information usually separated from monitor data?

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions