Question : WMIC Get Make, Model and Serial Number

How would I get the make, model and serial number using WMIC outputted to a csv file in the below format.

Make, Model, SerialNumber
Dell, Inspiron, 123456
Dell, Inspiron, 123456
Dell, Inspiron, 123456
Dell, Inspiron, 123456

Answer : WMIC Get Make, Model and Serial Number

Give this a try and let me know if it looks decent.  You will need to save this as a BAT file, and edit the output file name near the top.

~bp
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
@echo off
 
set "OutputFile=c:\temp\EE26193131.txt"
 
for /F "skip=2 tokens=2-3 delims=," %%A in ('wmic computersystem get manufacturer^,model /FORMAT:csv') do (
  set "Manufacturer=%%A"
  set "Model=%%B"
)
 
for /F "skip=2 tokens=2 delims=," %%A in ('wmic systemenclosure get serialnumber /FORMAT:csv') do (
  set "Serial=%%A"
)
 
echo %Manufacturer%, %Model%, %Serial%>%OutputFile%
Random Solutions  
 
programming4us programming4us