Script to export all the servers in a Citrix Farm
Posted on April 27th, 2009
Sometimes it is useful to have a list of servers in a text file in order to perform some other task. The following script will export all servers from a Citrix Farm and add them to a text file.
This script uses the built in Citrix tool, qfarm, and cleans up the output to provide the required list. It uses a temporary file (qfarmservers.txt) during the process and deletes it at the end.
REM ***************************************************
REM qfarmservers = output from a qfarm /servers
REM serverlist = cleaned up list of all servers in farm
REM ***************************************************SET qfarmservers=c:\windows\temp\qfarmservers.txt
SET serverlist=c:\windows\temp\serverlist.txtqfarm /servers >>%qfarmServers%
for /f “skip=3 tokens=1″ %%1 in (%qfarmservers%) do (
echo %%1 >> %serverlist%
)
Del %qfarmservers% /q
Just change the log file location(s) as required.
Tags: Citrix, export, Presentation Server, qfarm, script, server, serverlist, servers, text, XenApp
Filed under Scripts/Reg | 1 Comment »
MFCOM script to export the current users of an application
Posted on April 27th, 2009
Sometimes is is necessary to have a list of users in a text file of which other scripts can be run. In this case I wanted a list of all users currently logged into a specific Citrix application in order to perform some other task.
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 | 1 Comment »
The Citrix Presentation Server 4.5 Installation Effectively Hangs
Posted on September 4th, 2008
Originally published here: CTX113639
Hotfix available here: CTXUpdate.zip
I have come across this problem and this hotfix definitely fixes it.
Symptoms
In some environments where multiple domains and multiple trusts exist, the installation of Citrix Presentation Server 4.5 appears to hang when the “Citrix is Installing Product Components” message is displayed.
The installation completes successfully if left for a period of 15 hours or more.
Tags: 4.5, CTX113639, freeze, hang slow, hotfix, install, installation, MST, multiple domains, Presentation Server, transform
Filed under Citrix XenApp | No Comments »
