/build/static/layout/Breadcrumb_cap_w.png

WMIC Format Question

We need to run WMIC on about 1,500 machines (none of which have SCCM). We need to gather a lot of information, example:


cmd.exe /c wmic /append:"\\Server01\Logs$\inventory\Master.txt" computersystem get name, manufacturer /FORMAT:CSV
cmd.exe /c wmic /append:"\\Server01\Logs$\inventory\Master.txt" csproduct get name /FORMAT:CSV
cmd.exe /c wmic /append:"\\Server01\Logs$\inventory\Master.txt" diskdrive get size /FORMAT:CSV
cmd.exe /c wmic /append:"\\Server01\Logs$\inventory\Master.txt" wmic cpu get name,Manufacturer /FORMAT:CSV
cmd.exe /c wmic /append:"\\Server01\Logs$\inventory\Master.txt" memphysical get MaxCapacity /FORMAT:CSV
cmd.exe /c wmic /append:"\\Server01\Logs$\inventory\Master.txt" wmic OS get name,version /FORMAT:CSV

All of this works but the formatting in master.txt is total garbage. I've tried writing to a .htm file and it's no better.

Is there anyway to get wmic to format things in a better way? When I open up the .TXT file in Excel I want to be able to have stuff formatted in columns so we can sort but it's a big pile of junk at this point.

0 Comments   [ + ] Show comments

Answers (2)

Posted by: pjgeutjens 12 years ago
Red Belt
0
According to your command lines the output should be in CSV format. Are you sure that you cannot use excel's text-to-column functionality to filter out your data?

One thing I notice is that you seem to be putting data in a single textfile with different column-formatting in the different lines. You might want to make sure you combine data that has different column structure in separate files...


PJ
Posted by: anonymous_9363 12 years ago
Red Belt
0
Check out MouseTrax's Domain Reporting Tool (no affiliation). I have run this - in customised form - for almost all of my clients at some point or other. Being in script - and in neatly modularised form - it's relatively simple to customise according to your client's requirements.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ