Pages

Showing posts with label citrix. Show all posts
Showing posts with label citrix. Show all posts

Wednesday, January 29, 2014

Powershell script to create a report for whether or not a Citrix Xenapp Hotfix is installed on Citrix Xenapp farm servers or not


One of the second biggest pain for me as a farm administrator has always been to figure out if the XenApp Servers in the farm do have the latest rollup (or hotfix installed. And which are the servers where the latest roll up is not installed. The biggest pain of course is to install it remotely on all the XenApp servers ( I am still working in that one).

So I have this script that creates a report for a particular rollup pack or hotfix telling which servers have the hotfix installed and which don’t. It also creates a list of servers where the hotfix is not installed so I can install the hotfix on those servers.

I have tested this script on XenApp 6.0 farm. I ran the script from a XenApp server in the farm.



# Script to create a report on whether the hotfix is installed or not on the
# XenApp servers
# Created by: Ruby Nahal


# Register Addins if missing
$snapin = Get-PSSnapin | where {$_.name -eq 'Citrix.Common.Commands'}
if($snapin -eq $null){ Add-PSSnapin Citrix.Common.Commands }
$snapin = Get-PSSnapin | where {$_.name -eq 'Citrix.XenApp.Commands'}
if($snapin -eq $null){ Add-PSSnapin Citrix.XenApp.Commands }

$farm = Get-XAfarm          #get farm info
$servers = Get-XAServer    # get all the xenapp servers in the farm
[string]$CXAName              # string object to store the Xenapp server name
$logfile = "C:\Support\XAreport.txt"         # log file to store CXA name and if the hotfix is installed or not
$CXAList = "C:\Support\CXAlist.txt"                   #list of servers that do not have the hotfix installed

Foreach($CXA in $servers)            #run for each CXA or Xenapp server in the farm
{
[Boolean]$RUisInstalled = $false    #boolean variable to check the status of hotfix on the server
$CXAName = $CXA.Servername                        #Get the server name for the CXA in the current loop
Write-Output $CXAName                                # write the cxa name

#function XenappHotfixRU2Report([string]$HotfixName)           #can also use this script as a function for multiple hotfixes
#       {
    # Get current computername and XenServer object
    [String]$HotfixName = 'XA600W2K8R2X64R02'          #hotfix in question - will be commented out if used as the function
   
    foreach($hotfix in (Get-XAServerHotFix -ServerName $CXAName)) #run for each hotfix installed on the server
          {
           
        if($hotfix.HotfixName -eq $HotfixName) #if hotfix name is equal to the $hotfixname set the boolean variable to true
                             {
                             $RUisInstalled = $true
                             }
                   else
                             {
                             echo ".." # else, basically do nothing
                             }
          }
                   echo "'n****** $CXAName *******" | Out-File $logfile -Append -Width 240 # write the CXA name to the log file
                   if ($RUisInstalled)  # tell us if hotfix is installed or not by writing it to the log file
                             {
                             echo "Rollup Installed" | Out-File $logfile -Append -Width 240
                             }
                   Else
                             {
                             echo "Rollup was Not Installed" | Out-File $logfile -Append -Width 240
                             echo $CXAName | Out-File $CXAList -Append -Width 240
                             }
#       }
          #XenappHotfixRU2Report 'XA600W2K8R2X64R02'

}

Tuesday, January 28, 2014

Workspace control on Citrix Xenapp published desktop


What this means?

-          If you login to published Desktop from computer 1 and then go to computer 2 and login from there, your session will automatically get disconnected from computer 1 and launch on computer 2. You will NOT get the error “you have reached the concurrent session limit”

-          Auto- launch is disabled. This is a default from citrix that when workspace control is enabled, auto-launch will be disabled. This means, when you open the login page and enter your username and password, the session will NOT launch automatically. You will have to click on the Application icon to launch your session

Where this does not work?

-          If a session is running on computer 1 and you attempt to launch another session to the same desktop, you WILL get the concurrent limit error.

How this is done?

In Citrix Appcenter, expand “applications” and right click on the application you want to enable this on and select application properties. Select the “Name” section and under “application description”, type in the following

KEYWORDS:TreatAsApp Auto

TreatAsApp forces the desktop to be treated as a published application and enables workspace control

Auto automatically subscribes to the application in the storefront and the user does not need to manually add the application.

Wednesday, January 1, 2014

How to disable the save password option on the Citrix Reciever from Citrix Storefront 2.0



When the users logged in using receiver for windows directly instead of using receiver for web (receiver for web is the webpage we access using the browser – the typical way we log on) it allowed you to save passwords and so next time you open it, you are already logged on to receiver. Bit too much of a security concern for us. The solution from citrix is to change a registry on the client computers which doesn’t quite work for us http://support.citrix.com/article/CTX134341. We wanted to do it at the infrastructure level and not at the client level. Although Citrix storefront did not provide this functionality out of the box, there is a workaround.



The following changes were made to the storefront servers to have the disable save password configured.

You can disable the ability to save passwords at the StoreFront level with the below instructions.

1.       Locate the Authentication service directory on disk under the IIS root folder.

e.g. “C:\inetpub\wwwroot\Citrix\Authentication”

2.       Open the file “\Views\ExplicitForms\Authenticate.aspx” in a text editor.

3.       Comment the following line

<% Html.RenderPartial(“SaveCredentialsRequirement”, SaveCredentials); %>



By replacing it with



<%-- Html.RenderPartial(“SaveCredentialsRequirement”, SaveCredentials); --%>



4.       Save the file.


Saturday, July 28, 2012

Solved - Cannot upgrade Xenapp 6.0 to Xenapp 6.5

I was super excited about the new Xenpp 6.5 with so many improvements focused on user experience and more. We have about 40 Xenpp 6.0 servers with over 500 users. So testing this was crucial as once you uninstall Xenapp 6.0 and install Xenapp 6.5, the only way of going back is restoring from the backup. I tried the upgrade utility provided by Citrix to no avail (http://support.citrix.com/article/CTX130614/). Xenapp 6.0 appeared to uninstall just fine but installation of Xenapp 6.5 failed. As many of you might already know there is no direct upgrade path from Xenpp 6.0 to Xenapp 6.5. The utility is merely a script that uninstalls all the components of Xenapp 6.0 and installs 6.5 and joins to the new Xenapp 6.5 farm. 

If i installed Xenapp 6.5 on a brand new server, it worked fine. But when i installed it on a server with Xenapp 6.0, using utility or manually uninstalling and installing it, it failed. After spending hours on research, i still couldnot make it work. There were many other people having the same problem, different solutions worked for different people. However, for me it was no luck. I finally managed to figured out that the problem was something to do with the Xenapp 6.0 not uninstalling properly, although all the components uninstalled successfully. 
Out of those 15 times i tried, this is how it worked for me

1. unjoin the Xenapp 6 server from the farm and uninstall Xenapp 6.0
2. Then uninstall all the citrix components.
 it might ask you to reboot after some of the uninstallations. I just rebooted it once after all the components were uninstalled. 
3. after the reboot, delete all the folders under C:\Program files (x86)\citrix\ except C:\Program files (x86)\citrix\Xentools (only if the VM is a Xen VM - you will have the Xen tools installed). You might get an access denied error for the folder C:\Program files (x86)\citrix\farmGPO. Take the ownership of the folder and then delete.
4. Next, open regedit, and delete all the keys under HKLM\software\citrix




5. reboot
6. Now install Xenapp 6.5 and the installation will succeed

Hope this helps :)

Wednesday, July 25, 2012

Citrix Xenapp 6.0 gives an error when users logon to the citrix web interface "An error occured when making the requested connection"







This error can occur because of a number of reasons concerning the Xenapp 6.0 server. Besides the obvious reason - the server does not have internet connectivity or is shut down, the tricky cause can be the load value for the server. This can be checked using the following command on the culprit Xenapp 6.0 server

QFARM /LOAD

This command will give you the list of the servers in the farm and their load value. If the load value of the server is 20000, it will refuse any further connections and give the above error. One more symptom is that you might not see the server in the list at all. This can be corrected by doing the following

1. Open Command prompt as administrator
2. Run the command "net stop imaservice" to stop the imaservice
3. Run the command "net start imaservice" to start the imaservice
NOTE: this can also be done through services.msc console but i have experienced that the imaservice tends to hang when restarted through services console. 

Once the service is restarted. The server will start accepting connections again.