Author: Joe
Script to list all Citrix published applications and the users/groups assigned to them
=============================================================
‘****************************************************************************
‘
‘pubAppRpt.vbs
‘
‘Description: Write to the cmd session a list of all published apps and the
‘ users and groups assigned to them.
‘
‘Usage: e.g. >cscript pubAppRpt.vbs
‘
‘****************************************************************************
Dim mfFarm
Dim mfApp
Dim mfGrp
Dim mfUsr
Set mfFarm = CreateObject(“MetaFrameCOM.MetaFrameFarm”)
mfFarm.Initialize 1
For Each mfApp In mfFarm.Applications
mfApp.LoadData 1
WScript.Echo “Published Application – ” & mfApp.Appname
WScript.Echo ” Groups”
For Each mfGrp In mfApp.Groups
WScript.Echo ” ” & mfGrp.GroupName
Next
WScript.Echo
WScript.Echo ” Users”
For Each mfUsr In mfApp.Users
WScript.Echo ” ” & mfUsr.UserName
Next
WScript.Echo
Next
=============================================================
Script to list all Citrix servers in a farm
=============================================================
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
ctxServer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & ctxServer & “\root\Citrix”)
Set colItems = objWMIService.ExecQuery(“SELECT * FROM Citrix_Server”, “WQL”, _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
Set objFSO = CreateObject(“Scripting.FileSystemObject”)
If objFSO.FileExists(“FarmServers.txt”) Then
objFSO.DeleteFile “FarmServers.txt”
End If
Set objOutput = objFSO.CreateTextFile(“FarmServers.txt”)
For Each objItem In colItems
objOutput.WriteBlankLines
objOutput.WriteLine “==========================================”
objOutput.WriteLine “Server Name: ” & objItem.ServerName
objOutput.WriteLine “==========================================”
objOutput.WriteLine “Domain: ” & objItem.Domain
objOutput.WriteLine “Farm Name: ” & objItem.FarmName
objOutput.WriteLine “IP Address: ” & objItem.IPAddress
objOutput.WriteLine “Logins Enabled: ” & objItem.LoginsEnabled
objOutput.WriteLine “Zone Name: ” & objItem.ZoneName
objOutput.WriteLine “Zone Ranking: ” & objItem.ZoneRanking
objOutput.WriteBlankLines(2)
Next
objOutput.Save
objOutput.Close
Set objShell = CreateObject(“WScript.Shell”)
objShell.Run “notepad.exe FarmServers.txt”
=============================================================
Citrix License Server Access error
You try and log onto the Citrix License Management Console, and get the following error:
“You did not authenticate correctly. Please try again or contact your System Administrator.”
This is likely due to your log credentials, or you do not have an account to administer the Licenses.
To overcome this, browse to:
C:\progfram files\citrix\licensing\lmc\tomcat\conf\tomcat-users.xml
edit the file, copy another account, and replace the username.
Citrix ICA file Creator
From Citrix PS4.5 onward, the option to create ica files within the Management Console has been removed. You now need to download the ICA file creator from Citrix.
Great website for accidental Citrix Admins
This website is for those who are thrown head first into the world of Citrix
Citrix Clientname Passthrough
This registry fix enables clientname passthrough on a Citrix server. This helps when a user logs onto a Citrix Published desktop, then launches a published app from the published desktop. In this situation, 2 concurrent licenses can be used up because the user is logging onto 2 different published apps from 2 different clients.
By adding this registry key to the server that is servicing the Published desktop, the client name will passed through to the Citrix server where the published app is published from, hence only 1 Citrix concurrent license is used up.
32-BIT OS Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\ICA Client\PASS THROUGH\”PASS THROUGH”=dword:00000001
64-BIT OS Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\PASS THROUGH\”PASS THROUGH”=dword:00000001