Tuesday, April 19, 2005

TaskList

TaskList is a cool command-line Windows XP command that can tell you additional information about processes that are running on your machine. I happened across this when I was looking for what the svchost.exe does. (You may have seen this in your “Windows Task Manager”.) svchost.exe runs services on your machine and to see what services are running enter the following at the command prompt.

tasklist /svc

Actually the /svc will display all the services for all the running processes and if the process isn’t running a service it will display “N/A”. If you only want to look at the svchost.exe process you can use the /fi switch.

tasklist /svc /fi "IMAGENAME eq svchost.exe"

IMAGENAME is the name of the column that you would like to filter (IMAGENAME is actually the process exe name). eq stands for equals and svchost.exe is the value.

Another useful switch is the /m. This will display all the DLL’s that are loaded for each of the running processes. Enter the following at the command prompt.

tasklist /m

To see a list of all the processes that have a specific DLL loaded you can enter the following.

tasklist /m netapi*

This will display all the processes that are running with the netapi32.dll loaded. (“*” is a wildcard. You can type out netapi32.dll if you like.)

For more help on this command you can use the /? switch. Enter the following at the command prompt to see more information on using the tasklist command.

tasklist /?

No comments: