Reputation: 133
I need to take the info i get from running wmic:root\cli>/node:COMPUTERNAME product get name,version,vendor to a txt document I've been searching for the answer but can't seem to find it. I've done it before but you know how it goes if you don't do something all the time you forget.
Thanks in advance
Upvotes: 1
Views: 9002
Reputation: 64
WMIC
has a Global /OUTPUT
switch, which must preceed any <command>
. To direct /OUTPUT
to a file,
C:\Windows\SysWOW64\wbem\WMIC.exe /OUTPUT:<path><filename> product get name,version,vendor
Allegedly, the destination of /OUTPUT:
can be configured to CLIPBOARD
, STDOUT
or <filename>
, but I've yet to get it to operate as desired.
I envision querying a host to check for the presence of an installed app. Something along the lines of,
C:\Windows\SysWOW64\wbem\WMIC.exe /OUTPUT:STDOUT | Find "<app-name-here>" product get name
Upvotes: 5
Reputation: 56188
wmic /node:COMPUTERNAME product get name,version,vendor >output.txt
use >>
instead of >
to append to a file
Upvotes: 3