// This is the script to give summary on the main page.
Think IPM

Wednesday, May 20, 2009

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 post any changes in the comments.

Have fun,

Aaron Silber 

@ECHO OFF
CLS
ECHO FarmKill v1.0
ECHO.
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.
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.
pause
GOTO :EOF

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


:EOF
blog comments powered by Disqus Blog Widget by LinkWithin