Quick Citrix XenApp Tip : Logons and Logoff messages in the EventLog.

Tuesday, February 10, 2009

imageHere is a nice tip provided by Frederic Serriere (Escalation Engineer, Citrix) on Doctor-Citrix.com :
To Log ICA Logons and Logoffs in the Server's EventLog,  add the following registry value:
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix
Value: wsxicaEvent

Data: DWORD:0x1

Note: EventID 2 for Logon and 3 for Logoff.

Aaron Silber (who sent this tip to me) also added a quick and dirty little script to grab the number of logons within a date range.  Requires PSLogList.

Echo This tool will tell you the number of logons from the date you specify
SET /p ICALogonDate="Please enter a starting date using the syntax of mm/dd/yy:”
For /f %%i in ('@psloglist -a %ICALogonDate% -o wsxica -i 2 application^|Find /i "ICA Client Logon" /c') Do CLS & ECHO. & Echo Total Number of Logons since %ICALogonDate%: %%i

Drop any enhancements in the Comments. :)

Next Post »