Hi,
I am using below script to get session on Citrix Farm but below script is giving me servername, user name and application name.
Can someone modify below script as I want information total no. of users connected on an application and that application is running on which server.
For Ex. : If notepad application is running on CTXServer1 then it would show information:
Server : CTXServer1
Application : Notepad
Total No. Of Users : 20
Script:
Const cMetaFrameWinFarmObject = 1Const MFSessionStateActive = 1Set theFarm = CreateObject("MetaFrameCOM.MetaFrameFarm")theFarm.Initialize(cMetaFrameWinFarmObject)intSessionCount = 0intActiveCount = 0For Each oSession In theFarm.Sessions intSessionCount = intSessionCount + 1 If (oSession.SessionState = MFSessionStateActive) and (oSession.SessionName <> "Console") Then intActiveCount = intActiveCount + 1' WScript.Echo vbcrlf & "*****************************" WScript.Echo oSession.UserName & " " & oSession.ServerName & " " & oSession.AppName End IfNextWScript.Echo "Total Session Count = " & intSessionCount & vbcrlf & "Active Session Count = " & intActiveCount
Thanks.
Anurag