Beyond TASKLIST

#1
The TCC TASKLIST command provides a list of active processes, but I have a need to put this information into a spreadsheet.

The TASKLIST.EXE program, included with the Windows OS, has an option to display the output format as CSV, which can be sent to the Windows Clipboard, and pasted into a spreadsheet.

To obtain this same information, and more, use the PowerShell Get-Process Cmdlet. The following example does what I require;

Code:
get-process | convertto-csv -delimiter "`t" -notypeinformation | clip
I then switch to my spreadsheet, and paste in the information.

If you don't like the name get-process, you can create a Powershell alias;

Code:
set-alias tasklist get-process
To run this PowerShell command from CMD.EXE;

Code:
powershell -command "& {get-process | convertto-csv -delimiter "`t" -notypeinformation}" | clip
To run this PowerShell command from TCC involves a little bit more;

Code:
SetLocal
setdos /X-57
powershell -command "& {get-process | convertto-csv -delimiter "`t" -notypeinformation}" | clip
EndLocal
If you just want information on one process, for example, tcc;

Code:
get-process tcc | convertto-csv -delimiter "`t" -notypeinformation | clip
If you just want specific properties on one process, for example, tcc;

Code:
get-process tcc | select-object name, fileversion, productversion, company | convertto-csv -delimiter "`t" -notypeinformation | clip
Again, I am sending the output of this command to the clipboard, so that I can paste it into a spreadsheet. If you just want to display the results on the display, eliminate the | clip

Joe