Set objServer = CreateObject("MetaFrameCOM.MetaFrameServer")
For each objSession in objServer.Sessions
Wscript.echo objSession.ClientName & " currently " & objSession.SessionState & ", running the following applicaitons(s)"
For each objApplication in objSession.Applications
WScript.echo vbTab & objApplication.AppName
Next
Next