Wednesday, August 22, 2012

PNA Removed from Citrix Receiver 3.3

Citrix are really trying to push StoreFront to their customers.  Since Citrix client 13 they have packaged the "plugin" into Citrix Receiver. 

Receiver is the framework in which plugins (Online, Offline (streamed), SSO (password manager) etc.) were managed by.  As users frequently just installed the Online Plugin it was confusing that the client needed for other operating systems was called Receiver.

Citrix decided to just go ahead and force users to use Receiver for Windows and make the Online Plugin a default addition thus making the naming consistent across the board.

This was ok on the whole, but since version 3.3 they have made a prompt which asks users for the URL for Citrix Storefront.  This does not accept a PNA web address and can be throughly confusing to users who are using a standard Web Interface to launch their applications!

The string provided in my earlier blog post still works to remove the receiver branding and popup, but it is not like end-users will install the software like this on their own PCs.

http://www.teamas.co.uk/2011/09/citrix-online-plugin-13.html

If you still want to use PNA you need to download a different version of receiver (receiver 3.3 Legacy PNA).  This can be found at the following website (MyCitrix login required)

https://www.citrix.com/English/SS/downloads/details.asp?downloadId=2327681&productId=1689163#top

If you do a basic install, it will not provide the old blue bubble in the system tray and will only show applications in the start menu.  To make it install like it did from the good old days use the installation string as follows

CitrixReceiverEnterprise.exe /silent ADDLOCAL="ICA_Client,SSON,USB,DesktopViewer,Flash,PN_Agent,Vd3d" ENABLE_SSON="Yes"

Friday, August 17, 2012

Updated Presence Application

In my last post I created a small powershell script which allowed users to see who was online by using information from the Citrix XenApp data collector.

I wanted to take this a little further to provide other information such as location etc.

The following form is the result.  It has been designed to be used by our support team rather than staff in general.



This shows the user status, the server which they are logged on to, their login time and their relative location.

It also has a Remote Assist button, this will launch remote assistance and show user sessions for that particular server.  Previously our support team had to either ask users which server they were logged on to, or find them in the DSC.  By using the presence form, it will speed up this process and give them other useful information as well.

The location is a tricky subject, to show this I had to add subnet IP addresses into the script.

Below is a copy of the script with some information edited or removed.  As stated in my previous post I am not a powershell guru and I am sure that some elements could be more streamlined.  If you have any comments then feel free to share them!


[system.reflection.assembly]::LoadWithPartialName( "System.Windows.Forms")
[system.reflection.assembly]::LoadWithPartialName("System.Drawing")
Function Location
{
    write-host "launching a function"
   
}
$form = New-Object Windows.Forms.Form
$form.text = "Presence"
$label = New-Object Windows.Forms.Label
$label.Location = New-Object Drawing.Point 50,30
$label.Size = New-Object Drawing.Point 200,15
$label.text = "Enter the users name below"
$statuslabel = New-Object Windows.Forms.Label
$statuslabel.Location = New-Object Drawing.Point 35,125
$statuslabel.Size = New-Object Drawing.Point 300,15
$statuslabel.visible = $False
$computerlabel = New-Object Windows.Forms.Label
$computerlabel.Location = New-Object Drawing.Point 35,160
$computerlabel.Size = New-Object Drawing.Point 300,15
$computerlabel.visible = $False
$Logintimelabel = New-Object Windows.Forms.Label
$logintimelabel.Location = New-Object Drawing.Point 35,195
$logintimelabel.Size = New-Object Drawing.Point 300,15
$logintimelabel.visible = $False
$locationlabel = New-Object Windows.Forms.Label
$locationlabel.Location = New-Object Drawing.Point 35,230
$locationlabel.Size = New-Object Drawing.Point 300,15
$locationlabel.visible = $False
$OfferRAbutton = New-Object Windows.Forms.Button
$OfferRAbutton.text = "Remote Assist"
$OfferRAbutton.Location = New-Object Drawing.Point 90,265
$OfferRAbutton.Size = New-Object Drawing.Point 100,30
$OfferRAbutton.visible = $False
$OfferRAbutton.Add_Click({C:\Windows\System32\msra.exe /offerRA $server})
$textfield = New-Object Windows.Forms.TextBox
$textfield.Location = New-Object Drawing.Point 50,60
$textfield.Size = New-Object Drawing.Point 200,30

$button = New-Object Windows.Forms.Button
$button.text = "Go!"
$button.Location = New-Object Drawing.Point 100,90
$button.Add_Click({
$locationlabel.visible = $False
$statuslabel.visible = $False
 $computerlabel.visible = $False
    $logintimelabel.visible = $False
if ( (Get-PSSnapin -Name Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue) -eq $null )
{Add-PsSnapin Quest.ActiveRoles.ADManagement}
if ( (Get-PSSnapin -Name Citrix* -ErrorAction SilentlyContinue) -eq $null )
{Add-PsSnapin Citrix*}
$accounts = @(get-qaduser $textfield.text)
$passedname = $textfield.text
If(!$accounts) {$Statuslabel.text = "$passedname cannot be found in the system"
   $statuslabel.visible = $True}
If($accounts){
$account = $accounts[0]
$session = Get-XASession -Account $account.ntaccountname -Full | Where {$_.State -ne "Disconnected" -and $_.BrowserName -eq "Desktop"} | sort-object AccountName
$iplocation = $session.ClientIPV4
$fullname = $account.name
$Server = $session.servername
$LoginTime = $session.logonTime
If(!$session){
$Statuslabel.text = "$fullname is not logged into My Desktop"
$statuslabel.visible = $True
                }
If($session){
switch -wildcard ($iplocation)
    {
    "192.168.0.*" {$txtlocation = "Site Ground Floor"}
    "192.168.1.*" {$txtlocation = "Site 1st Floor"}
    "192.168.2.*" {$txtlocation = "Site 2nd Floor"}
    "192.168.3.*" {$txtlocation = "Site 3rd Floor"}
    "192.168.4.*" {$txtlocation = "Site 4th Floor"}
    "172.20.8.*" {$txtlocation = "Site 2"}
    "172.20.9.*" {$txtlocation = "Site 3"}
    default {$txtlocation = "Location cannot be determined"}
    }
$lastinput = $session.LastInputTime
$currenttime =$session.CurrentTime
$idletime =($currenttime - $lastinput).Minutes
if ($idletime -lt 5) {
Location
$Status = "Online"
$Statuslabel.text = "$Fullname is $status"
$computerlabel.text = "Server name = $Server"
$logintimelabel.text = "Login Time = $LoginTime"
$locationlabel.text = "Location = $txtlocation"
    $locationlabel.visible = $True
    $statuslabel.visible = $True
    $computerlabel.visible = $True
    $logintimelabel.visible = $True
    $OfferRAbutton.visible = $True
                        }
                       
                       
Elseif ($idletime -gt 4) {
Location
$Status = "Away"
$Statuslabel.text = "$Fullname has been $status for $idletime minutes"
$computerlabel.text = "Server name = $Server"
$logintimelabel.text = "Login Time = $LoginTime"
$locationlabel.text = "Location = $txtlocation"
    $locationlabel.visible = $True
    $statuslabel.visible = $True
    $computerlabel.visible = $True
    $logintimelabel.visible = $True
    $OfferRAbutton.visible = $True
                            }
                }
               }
})
# Add the controls to the Form
$form.controls.add($button)
$form.controls.add($label)
$form.controls.add($StatusLabel)
$form.controls.add($textfield)
$form.controls.add($computerlabel)
$form.controls.add($Logintimelabel)
$form.controls.add($OfferRAbutton)
$form.controls.add($locationlabel)

# Display the dialog
$form.ShowDialog()