I have written a piece of code in Batch script which is somewhat like :
(
wmic.exe /node:x.x.x.x computersystem get name
wmic.exe /node:x.x.x.x computersystem get domain
wmic.exe /node:x.x.x.x computersystem get manufacturer
wmic.exe /node:x.x.x.x computersystem get model
wmic.exe /node:x.x.x.x computersystem get username
wmic.exe /node:x.x.x.x computersystem get systemtype
) >> file.txt
The contents of file.txt
are :
ABC123
xyz.com
Hewlett-Packard
HP xw4400 Workstation
ABC123\Administrator
x64-based PC
I want above information to be stored in CSV format as follows :
ABC123 , xyz.com , Hewlett-Packard , HP xw4400 Workstation , ABC123\Administrator , x64-based PC
How can this be achieved?