featured_spectre Posted January 8, 2014 Posted January 8, 2014 Hi chaps. 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. 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
sted Posted January 8, 2014 Posted January 8, 2014 http://www.edugeek.net/forums/windows/92976-network-pc-inventory-script.html 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
featured_spectre Posted January 8, 2014 Author Posted January 8, 2014 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now