MFCOM script to export the current users of an application
Posted on April 27th, 2009
The following MFCOM script will export all the users currently logged into a specified application and export them to a text file.
Set objFarm = CreateObject(“MetaFrameCOM.MetaFrameFarm”)
Dim ObjFSO, Objuserlist
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set Objuserlist = objFSO.OpenTextFile(“c:\windows\temp\userlist.log”, 8, True)objFarm.Initialize(1)
For Each objSession In objfarm.Sessions
if objsession.appname = (“My Application Name”) then
objuserlist.WriteLine(objSession.UserName)
End IF
NextWScript.Echo “userlist created here – c:\windows\temp\userlist.log”
Substitute “My Application name” and the log file location as appropriate.
Save this as a .vbs file and run.
Tags: Citrix, export, list, mfcom, Presentation Server, scipt, user, vb
Filed under Scripts/Reg |
One Response to “MFCOM script to export the current users of an application”
-
Jason Says:
September 10th, 2009 at 1:43 pmVery interesting to read it















