network pc inventory script dosent so screen res but should help with the coding it generates 1 file per pc and is set to run as a startup script
Does anyone know of a way I can write a script to find out the name, and resolution of all machines on my network, and have it output to a txt file or an excel spreadsheet?
So far I have this which works fine locally, but comes up with a pop up, and it wont work if I want to run it from my machine or the server.
Code:Set wshShell = WScript.CreateObject( "WScript.Shell" ) strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" ) WScript.Echo "Computer Name: " & strComputerName strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_DesktopMonitor",,48) For Each objItem in colItems Wscript.Echo "ScreenWidth: " & objItem.ScreenWidth Wscript.Echo "ScreenHeight: " & objItem.ScreenHeight Next
unfortunately that pulls way too much info, and I need it literally just the resolutions. I have been asked to get a background out to everyone, but as some run laptops, some run desktops, some run win 7, some run win xp, some run vista, bit of a nightmare via GPO. Rather than go around 4 floors, and around 80 machines a floor, I figure a script is quicker, would output to a file, and make it easier for me to deploy as I can do it based on the resolution of everyone.
There are currently 1 users browsing this thread. (0 members and 1 guests)