Description: How to pass a sql query to osquery and save to a file. Tested on Windows only.
SQL:
echo SELECT * FROM system_info; | osqueryi --line
OR
echo SELECT * FROM system_info; | osqueryi --json > c:tempsystem_infojson
Operating Systems: Tested on Windows
Reference:
https://osquery.readthedocs.io/en/stable/introduction/using-osqueryi/
#command_line