Count Active Monitors on PC
During our yearly budgeting process, we have to get a count of the monitors that each PC has actively attached. Since we utilize a K1000 appliance to manage inventory, I suspect there is a method to collect this data and have it uploaded into the K1000. It would need to something that could dynamically change if someone got an additional monitor during the year that the count attached to their PC would change too. I am looking to have the data appear on each PC's inventory record and be able to be pulled into a report. Anyone got any suggestions?
Answers (1)
Top Answer
We were required by audit to get more detail on the montors. I found a freeware program that I could run to produce a file and read the part of that into Kace.
Monitorinfoview by NirSoft. https://www.nirsoft.net/utils/monitor_info_view.html
This process uses 3 CIR's and one MI
Step1
Create a Cir to see if the file exists on the machine
And an MI to put it there if it does not.
The batch file checks for the existence of c:\temp. If not there create it
xcopy the exe from the kace directory to temp.
Step 2
Create CIR to create txt file in c:\temp
ShellCommandTextReturn(cmd /c if exist "C:\temp\MonitorInfoView.exe" C:\temp\MonitorInfoView.exe /stext C:\temp\monitorinfo.txt /HideInactiveMonitors 1)
Step 3
Create a Cir to filter the file you created in step 2
Shellcommandtextreturn(cmd /c if exist c:\temp\monitorinfo.txt (echo off & for %g in (c:\temp\monitorinfo.txt) do (findstr /v /b /c:"Active" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Active" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"ManufacturerID" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"ProductID" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"Maximum" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Image Size" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"Horizontal" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Vertical" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"Digital" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Standby" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"Suspend" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Low-Power" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"Default" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Display" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"EDID" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"Registry" %g > C:\temp\temp.txt) && for %g in (c:\temp\temp.txt) do (findstr /v /b /c:"Computer" %g > C:\temp\temp1.txt) && for %g in (c:\temp\temp1.txt) do (findstr /v /b /c:"=" %g > C:\temp\filtermonitor.txt) && type C:\temp\filtermonitor.txt))
The output looks like this