How To Get Monitor Serial Number In Powershell
October 3rd, 2013Summary: Microsoft Scripting Guy, Ed Wilson, talks about how to use Windows PowerShell to discover multi-monitor configuration information on your computer.Hey, Scripting Guy! I am a long time reader, but a first time writer. I have been following your blog for years. You are awesome! I have become good at navigating around various WMI classes, but I need to find information about multiple monitors that are connected to my laptop running Windows 7.
Ideally, I would like to know if it is connected to only the laptop display, or if there is an added monitor. If I can also find the resolution, it would be awesome.—BGHello BG,Microsoft Scripting Guy, Ed Wilson, is here. I just got off a LYNC call with my mentee.
Solved Help with Collecting Monitor Serial Number (self.PowerShell) submitted 2 years ago. by iPhonebro I'm running into a roadblock with trying to collect the serial number of an attached monitor. Retrieve Monitor Serial Numbers with PowerShell 1 minute read This function gathers monitor EDID data using the WmiMonitorID WMI class. This class was introduced in Windows Vista, so this function will not work against XP systems. Here's a powershell sample to get you started, it may not be perfect but it will get you in the right direction. The csv file will need to have a header named computername. You will also need to have powershell 3.0 or greater.
We were talking about how important our customers are to us. I told him that I simply cannot do my job properly if I do not talk to customers, hear from customers, and speak to customer groups on a regular basis. He is working on a book, and he mentioned that he misses immediate feedback from customers when he is writing. With my blog, I get feedback every day.
In fact, I get an email notification when a comment is written to the blog. These comments make the blog better for us all. Also, the email sent to is really important because this is where I get many of my ideas for posts.So BG, thank you for writing.There are a couple of WMI classes that provide information about resolution and monitors.
One of these classes is the Win32VideoController class. I can query this by using Get-CimInstance in Windows PowerShell 3.0, or I can use Get-WmiObject in Windows 7 with the default Windows PowerShell 2.0. The command is shown here:Get-WmiObject win32videocontrollerFollowing is the command and its associated output:By looking at the output, I can see that I am most interested in the caption, and in the CurrentHorizontalResolution and CurrentVerticalResolution properties. I write the query this way:PS C: Get-WmiObject win32videocontroller select caption, CurrentHorizontalResolution, CurrentVerticalResolutionThe command and its output are as follows:The cool thing is that I can use a wildcard character and the alias and really shorten this command as shown here:GWMI win32videocontroller select caption, Current.ResolutionSo, I have discovered that I have two video controllers on my computer, but both of them are set to use the same resolution.Well, what about monitors?To find information about the monitors, I use the Win32Desktopmonitor WMI class. The query is shown here:Get-WmiObject win32desktopmonitorThe default display shows information about the screen height and screen width. But this information, for some reason, does not appear for my laptop monitor itself.
This is shown in the following image:Of course, I already have some of this information from the Video Controller. So I can sort of work back and forth with this.There is a cool WMI class on my laptop running Windows 8 (I’m not sure if it exists on Windows 7 devices). It is in the RootWMI namespace.
The class is WmiMonitorBasicDisplayParams, and it tells me if a display is active. It also tells me the capabilities of that monitor. Using the Get-CimInstance cmdlet produces a nice output (but you can also use Get-WmiObject).
Here is the command:Get-CimInstance -Namespace rootwmi -ClassName WmiMonitorBasicDisplayParamsThe command and the output are shown here:The SupportedDisplayFeatures property returns another object. The easy way to look at this is to store the object in a variable, and then address it directly. This technique is shown in the following image:BG, that is all there is to using Windows PowerShell to find multi-monitoring information. Join me tomorrow when I will talk about more cool Windows PowerShell stuff.I invite you to follow me on. If you have any questions, send email to me at, or post your questions on the. See you tomorrow.
Serial Number Lookup
Until then, peace.Ed Wilson, Microsoft Scripting Guy.
How can I get the manufacturer and model of my monitor from within Windows, without having to disconnect and manhandle a 27' inch monitor looking for a label that may not exist, or download any third-party software? It seems odd that there's no native, software-only solution to do this on Windows 7.UPDATE #1:This question was initially claimed to be a duplicate of another question. It isn't a duplicate of the proposed question because:.The proposed question is specific to laptops.The proposed question is incredibly broad, seeking to cover all (laptop) hardware with a single solution. My question, by contrast, is asking about a piece of hardware specific to desktop computers. I did so knowing that it is notoriously hard for Windows 7 users to obtain specifics for said piece of hardware with a native software solution.
Try the free utility created by Nir Sofer of. It's a command line utility, so you will need to run it from a. There's no installation process needed; you can run the program after extracting it from the downloaded zip file. I've included output from the program below as an example of the information it provides.