How to Kill a running process across a WHOLE Citrix Farm

imageDon’t know about you, but if you are like me then you would have come across the situation where you need to whack a process that is running on all servers in your Citrix farm regardless of user session, then you’ll know that there isn’t a quick way to do it from the command line. You could go into the Management Console, but who wants to do that?!

I present FarmKill v1.0.  Create as a .cmd and feel free to modify.  For newer versions of Citrix, you the new QFarm utility.

Have fun,

Aaron Silber 

ECHO FarmKill v1.0
Echo This command will allow you to kill a process that is running
Echo on all online Citrix Farm servers, from all user sessions.
Echo Please be careful running this as it will not ask for confirmation once it starts!
Echo .
Echo .
IF /i "%1"=="" Goto MissingProc
For /F "skip=3" %%s in ('QFarm /ONLINE') do @Echo Checking Server: %%s & Taskkill /S %%s /F /IM "%1" & Echo.

Echo .
Echo You forgot to specify a process to kill!
Echo Please use the syntax: FarmKill Processname