Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to have a script that does the following thing:

  1. connect to a remote windows machine
  2. get the list of applications that are currently open on the machine, e.g exactly what I would get in the "applications" tab in the task manager, and print it.

Is it possible to do that in batch? If not, what other options do I have?

share|improve this question
tasklist will show you all running processes. Works in most newer versions of windows. – Kiwi Mar 12 '10 at 13:25
@kiwi - Thanks, but I don't want processes, rather applications – olamundo Mar 12 '10 at 13:33
Well how could your OS tell the difference between applications and processes? – Kiwi Mar 12 '10 at 13:44
@kiwi - if I open taskmanager -> the "applications" tab, the OS shows me what I want, so apparently it has a way of telling the difference... – olamundo Mar 12 '10 at 13:53

If you have powershell installed, the following will get you a list of running applicaitons when run locally

gps | ? {$_.mainwindowtitle.length -ne 0} | select name, mainwindowtitle

If you have Powershell V2 installed on the machines you want to query, and remoting enabled, you can then run:

invoke-command –computername <remote computer name> 
{gps | ? {$_.mainwindowtitle.length -ne 0} | select name, mainwindowtitle}
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.