ergh.blogg.se

Powershell get monitor model
Powershell get monitor model






powershell get monitor model

Write-Warning -Message "An error occurred on $($p.OriginInfo). $Monitors = Get-CimInstance -ClassName WmiMonitorID -Namespace root/WMI -Property ManufacturerName,UserFriendlyName,SerialNumberIDįoreach ($Monitor in $Monitors | Where-Object $BIOS = Get-CimInstance -ClassName Win32_BIOS -Property SerialNumber $ComputerInfo = Get-CimInstance -ClassName Win32_ComputerSystem -Property Username,Name,Manufacturer,Model If the computer doesn't have a 2nd monitor, it lists "none" in column "I". For more monitors I found this Get Screen resolution using WMI/powershell in Windows 7 but don't know how to format/implement it to fit my script. The script works fine, I have problem when computers with two graphic cards or multiple monitors. In column H, I would like it to list the monitor 1 serial number and column "I" to either list the serial number of the 2nd monitor. 1 I am using the following script to get system information.

powershell get monitor model

The goal is to get the final csv to show only the computer name once, and detect if the computer has one or more monitors and list them in the csv headers.

powershell get monitor model

After the script runs, it generates a CSV containing the computer name, Last logged on user, computer manufacturer, computer model, computer serial, monitor manufacturer, monitor model, and monitor serial. I'm wrapping up a PowerShell GUI tool which was created for our team involved with doing system inventory. First of all, let me start off by saying this is a great reddit community and I really appreciate the insightful guidance I've received in the past.








Powershell get monitor model