The Windows task manager has a column labeled Command Line that shows the command that started the given task, with all the switches and parameters, for example:
test.exe -V -A 127.0.0.1 -P 6062
Now I have to identify a certain task that is listening on a certain port and/or was called with a certain switch combination. My aim is to close the selected task, but not others, so if there are multiple
test.exe tasks running, I cannot simply close all tasks returned by:
tasklist /fo csv /nh /fi "imagename eq test.exe"
Unfortunately it seems like neither
pslist (here) is able to return the Command Line field. How can I overcome this problem?