Quantcast
Channel: Citrix, Appsense and APP-V Knowledgebase
Viewing all 85 articles
Browse latest View live

Citrix HDX flash Redirection

$
0
0
A customer had a strange issue with Flash Re-direction to their Windows THIN build PCs. The playback of videos on youtube seemed to stop after a few seconds.

The customer noticed when plugging headphones into the device the playback continued as normal.

As a workaround the customer set the following registry key value to disabled jack detection on the end-point.

Open registry Editor with elevated privileges
·         Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E96C-E325-11CE-BFC1-08002BE10318}\0000\GlobalSettings

·         Change the value EnableDynamicDevices to zero


Appsense DesktopNow 8.5 Update Process

$
0
0
I wanted to familiarise myself with the Appsense Upgrade process especially as they have released DesktopNow 8.5 which is there first major release in a long time.

Pre-Reqs
Backup the database
Save out all the configurations
Take personalisation servers offline.

Update Order
Server
Database
Agents
Configuration

Server & Consoles
Update the server components. This will perform a schema update on the database on the 1st server to be updated. Other servers will all need to be updated to recognise the updated schema.
The Management consoles will also all need to be updated at this point.

At this point agents and configurations can continue to work as there is backward compatibility. However there is a risk as the consoles have new features that will not be supported by the agent.

Agents & Configuration
The configuration can be updated by simply opening the existing configuration, and answer YES to the upgrade prompt. The new Config & Agent can then be deployed by the management console.

Note : Personalisation Changes, 8.5 does not use "Session Data" and "Desktop Setting" as in past versions. This functionality is now part of "Windows Personalisation"
In version of 8.3 and 8 FR4 the conversion is handle by an migrate process that occurs as each users logs on. The older setting are kept and will show up as (legacy) in the Personalisation view. These setting can later be deleted with a script.


Citrix XenMobile 9 "server requires client certificate" error message

$
0
0
My new Xenmobile 9 installation alongside Netsclaer 10.5 using the SSL Offload configuration kept giving me an error on the WORXMAIL client of

"server requires client certificate"

I tried to access the XenMobile server direct and through the Netscaler but with the same error each time.

Eventually this turned out to be quite simple, a incorrect firewall policy was blocking port 8443 to the required IP addresses in the DMZ.

Ensuring the rule allowed communication to the SSL Offload VIP address allowed me to correct this error.

Another Gotcha i had on this was i changed the XenMobile Server to use External Certificates as per Citrix Article. I did not notice but the "externalSslCert" wording is case sensitive.

Citrix receiver Registry Keys

$
0
0
The Citrix Receiver should be configured to communicate with our Storefront services site.

This can either be configured via a number of methods
Manually
Receiver ADMX policy
Citrix XenDesktop policy on Deployment group

Manual Method

When we fill in the prompts from the Reciever we can see the following entries go into the registry.

The Manual method puts the following items in the registry

HKCU\Software\Citrix\Dazzle\Sites\storename-xxxxx

ConfigURL = https://fqdn/Citrix/Storename/discovery
Configured by Administrator = False
Enabled by Admin = True

Reciever ADMX
We need to add the

Xendesktop Policy Method

Im still trying to get this working !!!


Microsoft Word Table Color Macro

$
0
0
The following macros can be used to change the color of the first columns in a table, and also to control the border color.

Sub ApplyBordersToAllTables()

Dim oTable As Table
Dim oBorderStyle As WdLineStyle
Dim oBorderWidth As WdLineWidth
Dim oBorderColor As WdColor
Dim n As Long 'used to count tables for message
Dim i As Long 'used with array
Dim oArray As Variant

'Change the values below to apply other borders
oBorderStyle = wdLineStyleSingle
oBorderWidth = wdLineWidth050pt
oBorderColor = wdColorBlue

'Define array with the borders to be changed
'Diagonal borders not included here
oArray = Array(wdBorderTop, _
wdBorderLeft, _
wdBorderBottom, _
wdBorderRight, _
wdBorderHorizontal, _
wdBorderVertical)

For Each oTable In ActiveDocument.Tables
n = n + 1
With oTable
For i = LBound(oArray) To UBound(oArray)
With .Borders(oArray(i))
.LineStyle = oBorderStyle
.LineWidth = wdLineWidth050pt
.Color = wdColorBlack
End With
Next i
End With
Next oTable

MsgBox "Finished applying borders to "& n & " tables."
End Sub
   
   
Sub decolordocument()
'
' decolordocument Macro
'
'
Dim first As Boolean
Dim tbl As Table
n = 0
For Each tbl In ActiveDocument.Tables
tbl.Shading.BackgroundPatternColor = wdColorWhite
n = n + 1
y = 1
    For Each Col In tbl.Columns
                ActiveDocument.Tables(n).Cell(1, y).Shading.BackgroundPatternColor = wdColorLightBlue
                y = y + 1
    Next
Next

Appsense Environment Manager & explorer.exe for Published applications

$
0
0
During testing today i confirmed that when running a published application from XenDesktop/Xenapp any actions that are assigned against explorer.exe will not execute.
This means that items required before an application launch would need to be moved into the logon node as normal.

Using explorer.exe as a trigger was used as way to try and make process wrong later in the logon process.

Appsense 8.5 onwards has new triggers built in to handle this scenario and this should help things.

Appsense Environment Manager Powershell Execution Policy

$
0
0
The following is an extract from the documentation surrounding powershell being embedded into Appsense Environment manager configurations.

The basics are if the powershell is to run in the user context you will need to ensure that powershell execution is allowed. 

You can control the powershell execution mode using GPO managed inside the appsense policy. 

Environment Manager overrides execution policies and bypasses any restrictions to enable the PowerShell scripts to run.

Execution polices for users and computers can also be set through Group Policy which override all PowerShell execution policies. A user policy which does not allow any scripts, or only those which are signed, will not affect the running of PowerShell Custom conditions if they are run as System. However, if run as the current user the user policy will not allow the scripts and the Custom condition will fail. A computer policy which does not allow any scripts or only those which are signed, will not allow the running of any PowerShell Custom conditions. Therefore, to successfully run Custom conditions which use PowerShell, your Group Policy must be set to allow these scripts to run for users and computers.

Appsense Citrix Receiver Personalization Settings

$
0
0
The following are my suggestions for Appsense personalization of the the Citrix Reciever application

Application List
authmansvr.exe
concentr.exe
PrimaryAuthModule.exe
Receiver.exe
SelfService.exe
Selfserviceplugin.exe
updater.exe
wfcrun32.exe

Registry Include
HKCU\Software\Citrix







Citrix Receiver SSON install switches

Citrix Netscaler console GUI Java Problems

$
0
0
Java updates usually prevent Netscaler Admin console from working as expected.
We typically get stuck on a 1% loading screen

The process below typically correct these issues

Java Control Panel settings
Open up the Windows Control Panel and start the Java Control panel.
General -> Temporary Internet Files -> Settings and UnselectKeep temporary files on my computer.
General -> Advanced and configure the following options
“Mixed code (sandboxed vs trusted) security verification” = “Disable verification”
“Perform certificate revocation checks on” = “Do not check”
General ->disable the next generation Java plugin

Also note that the console require either 80 or 443 for HTTP traffic and 3008 or 3010 for Java Traffic.

Appsense Control The Windows 7 Start Menu

$
0
0
Personalize the windows 7 Start Menu with Appsense

The Start Menu allows for Shortcut Icons to be delivered to All Users or  Per User.
It also allows for users to PIN their favourite shortcuts to either the start menu or taskbar or both.

All Users
Shortcuts are stored in C:\ProgramData\Microsoft\Windows\Start Menu

Per User Start Menu
Shortcuts are stored in C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Start Menu

Pinned Items 
Pinned items are stored in the file system and the registry.

%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\StartMenu
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband

Common Practice With Appsense Personalization

Pinned Items
Appsense Personalization has a option to save users Pinned items. This is called "TaskBar and StartMenu" under Windows Personalization. 
This saves the pinned icons to the Personalization database.

All Users
The all users icons are stored at a machine level and as such are not touched by Appsense. This can potentially be an issue for licensed software. In this event ideally software packages should not deploy application icons and the icons can be delivered with an appsense EM policy.  I think that only software that has a user based license control should have its icons delivered with a policy. There is an overhead in managing icons this way and so keeping this to a minimum keeps your system optimised. Obviously Appsense AM can also perform more application control than simply not giving a user an icon as mentioned here. 

Per User
If Per user shortcuts are to be persisted then there are two options.
Redirection of the users Start Menu is the most common. Simply use Policy to redirect the users start menu to a network location. 
An alternative then is to use a logon and logoff trigger to mirror the location to a network share
To Cater for Offline use case the Offline Files option on the redirection can be used. This keeps a copy of the redirected files in C:\windows\csc. 


Appsense Firefox Personalisation Settings (well redirect to network drive)

$
0
0
Its a bit of a misleading title actually as the following process can be used instead of using the Appsense personalization settings to manage Mozilla Firefox.

This technique was used due to the large amount of data that firefox was consuming and concerns over placing this all in appsense personalization.

Redirection technique
The following technique can be used to redirect mozilla firefox to store its data on a network drive. This means that NO firefox settings are required in appsense personalization, we only use appsense EM policy to manage the changes to the applications configuration to redirect it to the network drive.

The changes to Firefox need to be performed before Firefox.exe is launched so these can be placed either in logon, or post logon trigger in newer versions.

Each Logon
1.) Manipulate Profiles.ini
         Create a profiles.ini file in the users %appdata%\mozilla\firefox directory
         The profiles INI file controls the location where firefox files will be stored.
         The name and Path fields here should be edited.

              Name =xxx.profile
              Path=\\server\share\%username%\AppSettings\Firefox



On first Run
The following tasks are only required for the first time a user launches firefox. This will create the user a new firefox profile onto the location specified in the path set above in the INI file.

2) Check if this is the 1st run of the application.
         We need to perform a check to see if the user has created a profile before.
          For Example Look for H:\Appsettings\Firefox\Profiles\xxx.profile\prefs.js

3) Create a directory to place the user profile (if above did not exsist)
       For Example H:\Appsettings\Firefox\Profiles

4)  Run the firefox profile creation tool. This creates a new profile in the directory detailed in the profiles.ini updated earlier.
       eg. Firefox.exe -CreateProfile xxx.Profile
           

Re-Apply Windows Theme to existing Users

$
0
0
The windows theme can be managed with GPO , but this setting only takes effect if the user has no profile.

This is because the theme is set using an active setup execution, once execeuted once its tagged and it not run again.

If we want to set a theme for existing users who already have profiles we need to run the code contained in the RUN key.

%SystemRoot%\system32\regsvr32.exe /s /n /i:/UserInstall %SystemRoot%\system32\themeui.dll

This will then adhere to the theme settting within group policy.


BeWiseTrader Is it Scam Ponzi Pyramid Scheme

$
0
0
I have alot of facebook friends talking about BeWiseTraders money making scheme.
People have posted about how much money they have made and how great it is.

I watched the long video explaining the business.

98% of the presentation is about describing the referral payment system. If this was a legitimate investment surely it should be explaning how anyone can afford to deliver a instant return on someones money of around 30%, and explain why they need investment in the first place as if they truely have a great betting system then they can surely increase their pot without involving external investment.

They wont let you remove money from the scheme easily you have to use some strange hop. Again this is suspicious as why cant they support paypal or worldpay and other grown up payment systems that are very easy to incorporate into a website.

BeWiseTrader looks like and smells like a ponzi scam.
If you look up the website owner its listed as private, and has a dummy looking email address.
These are not signs of BeWiseTrader being a real trading company.


So what is BeWiseTrader likely to do with the money ?

Well they are most Likely paying the first to register with new money taking from sign-ups. They will keep doing this for a while until they get so big they can kill the company and keep the money within and disappear.

Thats my 2 cents worth on BeWiseTrader

Powershell list Microsoft Installed Patches

$
0
0
Create the script

Function Get-MSHotfix 

    $outputs = Invoke-Expression "wmic qfe list" 
    $outputs = $outputs[1..($outputs.length)] 
     
     
    foreach ($output in $Outputs) { 
        if ($output) { 
            $output = $output -replace 'y U','y-U' 
            $output = $output -replace 'NT A','NT-A' 
            $output = $output -replace '\s+',' ' 
            $parts = $output -split ' ' 
            if ($parts[5] -like "*/*/*") { 
                $Dateis = [datetime]::ParseExact($parts[5], '%M/%d/yyyy',[Globalization.cultureinfo]::GetCultureInfo("en-US").DateTimeFormat) 
            } else { 
                $Dateis = get-date([DateTime][Convert]::ToInt64("$parts[5]", 16))-Format '%M/%d/yyyy' 
            } 
            New-Object -Type PSObject -Property @{ 
                KBArticle = [string]$parts[0] 
                Computername = [string]$parts[1] 
                Description = [string]$parts[2] 
                FixComments = [string]$parts[6] 
                HotFixID = [string]$parts[3] 
                InstalledOn = Get-Date($Dateis)-format "dddd d MMMM yyyy" 
                InstalledBy = [string]$parts[4] 
                InstallDate = [string]$parts[7] 
                Name = [string]$parts[8] 
                ServicePackInEffect = [string]$parts[9] 
                Status = [string]$parts[10] 
            } 
        } 
    } 




Get-MSHotfix|Where-Object {$_.Installedon -gt ((Get-Date).Adddays(-2))}|Select-Object -Property Computername, KBArticle,InstalledOn, HotFixID, InstalledBy|Format-Table

To run this script across a number of machines remotely use the following

$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Definition 
."$scriptDirectory\Get-MSHotfix.ps1" 
$allUpdates = '' 
$array = @("host1""host2""host3"
for ($i=0; $i -lt $array.length; $i++) { 
$Updates = Invoke-Command -ComputerName $array[$i${function:Get-MSHotfix}|ft -HideTableHeaders 
$allUpdates +$Updates 

$allUpdates


APP-V 5 User Intergration Location & Appsense Personalization

$
0
0
Microsoft APP-V-5 has a user integration location set to %localuserprofile%
This location contains junction points to the the APP-V application under C:\ProgramData

We typically do not persist the data area %localuserprofile%
This means when the user logs off and back on their per user APP-V delivered applications will have broken icons and fail to launch.

A way to workaround this behaviour is to republish per user based App-V applications at logon time. This rebuild the Junciton points for the application.

We can use the Powershell command "Publish-AppVClientPackage""AppName"
to republish the users applications.

We can run this with an appsense Logon Trigger. We can also use a conditioncehck to make this more efficient like checking the user is a member of the AD group associated with the application and also checking the application is installed on this client machine.

Information on how APPV-V 5 and how it works can be found here
https://technet.microsoft.com/en-gb/library/dn508409.aspx#BKMK_pub_pkg_standalone_posh

Citrix MCS Catalog Failure Troubleshooting

$
0
0

 The following technique can be used to troubleshoot Image Preperation errors in Citrix Xendesktop.

1.) Set reg Key
On the master machine that will be cloned logon
add the following registry key
HKLM\Software\Citrix\MachineIdentityServiceAgent\Logging = 1

2.) Shutdown
Shutdown the Master VM

3.) Snapshot
Take Snapshot

4.) Disable auto-shutdown
On the DDC powershell run the following command
Set-ProvServiceConfigurationData -Name ImageManagementPrep_NoAutoShutdown -Value $True

5.) Create catalog
Create a new catalog from the snapshot

6.) Get Logfiles
When a new VM is created in the hypervisor , logon and check the log files in the root of C:\

7.) Enable auto-shutdown
On the DDC powershell run the following command
Remove-ProvServiceConfigurationData -Name ImageManagementPrep_NoAutoShutdown

Citrix XenDesktop 7 Connection Leasing (LHC replacement)

$
0
0

Citrix XenDesktop 7.6 Connection Leasing

Description

When Citrix changed the management architecture from IMA to FMA we faced a challenge in that database connectivity became important as without we lost management and the users could not make new connections. 

The "IMA" architecture featured a LHC (local Host Cache) Feature which kept a subset of database information on Farm Controllers. This meant a loss of connection to the database server would only impact the administrators. 

The newer "FMA" architecture had no such caching option and as such always required access to the SQL database to service admin and user requests.

This meant that we had a much greater reliance on a High available SQL than before. 

The release of XenDesktop 7.6 gave us a feature called "Connection Leasing" which gives us back a similar safety net that LHC had given us. 

The connection leasing feature supplements the SQL Server high availability best practices by enabling users to connect and reconnect to their most recently used applications and desktops, even when the Site database is not available.
Connections are cached for a lease period of two weeks. So, if the database becomes unavailable, the desktops and applications that the user launched in the previous two weeks remain accessible to that user through StoreFront. However, desktops and applications that have not been launched during the previous two-week lease period are not accessible when the database is unavailable
Connection Leasing will only occur in the event of a failure of all controllers within a site.

Database Sync

Each controller retrieves the sync information from the SQL database. This is throttled at a rate of up to 1000 leases every 10 seconds until all leases are synchronized.

Lease Files

The lease files are stored by default in
%programdata%\Citrix\Broker\Cache
The number of expected lease files can be calculated  using the following formula for Desktop accessible via LAN and Access Gateway.
(Users *2) + (Users * Desktops) + (Users * Application delivery groups) + VDAs
Leases file vary in size (0.5K – 512K) but will typically consume 4K blocks on NTFS file systems.

Example VDI Sizing

table to follow

VDA Registration

During connection leasing there is a 2 minute period at the start and end of the outage where VDAs maybe un-registered and then re-registered. This can have a performance impact with large amounts of machines registering in a short period.
In the event that some controllers remain connected to the database while others  fail, VDAs should register themselves with the working controller. Connection Leasing will only occur in the event of a failure of all controllers within a site.

SQL TimeOut

SQL queries have a default of 30s before they are deemed to have timed out, then the controllers will wait another 90s for a response, giving a total of 120 seconds before leasing will activate. This value can be altered if desired. (see parameters table)

Query Commands

The following commands can be used to view Broker Leasing information.
Set-BrokerSite -ConnectionLeasingEnabled $true|$false - Turns connection leasing on or off. Default = $true 
Get-BrokerServiceAddedCapability - Outputs “ConnectionLeasing” for the local Controller. 
Get-BrokerLease - Retrieves either all or a filtered set of current leases. 
Remove-BrokerLease - Marks either one or a filtered set of leases for deletion. 
Update-BrokerLocalLeaseCache – Updates the connection leasing cache on the local Controller. The data is resynchronized during the next synchronization.

Configurable Parameters

table to follow

Ping Test VBS

$
0
0
The following is a pretty handy Ping test script. I know it maybe should be PS but VBS is still handy.

on error resume next

Set objfso = CreateObject("scripting.filesystemobject")

Set objinputfile = objfso.OpenTextFile("machines.txt",1)
Set objOutputfileGood = objfso.CreateTextFile("PING-GOOD.txt",1)
Set objOutputfileFail = objfso.CreateTextFile("PING-FAIL.txt",1)

                Do Until ObjInputFile.AtEndOfStream
                                StrComputerName = objinputfile.ReadLine
                                strQuery = "SELECT * FROM Win32_PingStatus WHERE Address = '"& StrComputerName & "'"

                                ' Run the WMI query
                                Set colPingResults = GetObject
("winmgmts://./root/cimv2").ExecQuery( strQuery )

                                ' Translate the query results to either True or False
                                For Each objPingResult In colPingResults

                                If Not IsObject( objPingResult ) Then
                                objOutputfileFail.Writeline StrComputername
         ElseIf objPingResult.StatusCode = 0 Then
                                objOutputfileGood.Writeline StrComputername
         Else
                                objOutputfileFail.Writeline StrComputername
         End If
     Next


                loop

Wscript.Echo "Ping Test Completed"

Powershell GUI Interface

$
0
0
I was required to add my first powershell GUI today. The following code allows for a drop down selection box so this is handy to let a user choose from a variety of options to allow the script to continue.

The main window coding can be re-used multiple times as most of the code is the window size and postion etc..

This selector example reads an input CSV file to display to the user to select. It display the Site column information within the text file.

[void] [System.Reflection.Assembly]::LoadWithPartialName(
"System.Windows.Forms")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")

$objForm = New-Object System.Windows.Forms.Form $objForm.Text = "DesktopConnect Build Script"
$objForm.Size = New-Object System.Drawing.Size(300,200) $objForm.StartPosition = "CenterScreen"
$objForm.opacity = 1.0

$objForm.KeyPreview = $True
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Enter")
    {$global:XDSiteList=$objListBox.SelectedItem;$objForm.Close()}})
$objForm.Add_KeyDown({if ($_.KeyCode -eq "Escape")
    {$objForm.Close()}})

$OKButton = New-Object System.Windows.Forms.Button $OKButton.Location = New-Object System.Drawing.Size(75,120) $OKButton.Size = New-Object System.Drawing.Size(75,23) $OKButton.Text = "OK"
$OKButton.Add_Click({$global:XDSiteList=$objListBox.SelectedItem;$objForm.
Close()})
$objForm.Controls.Add($OKButton)

$CancelButton = New-Object System.Windows.Forms.Button $CancelButton.Location = New-Object System.Drawing.Size(150,120) $CancelButton.Size = New-Object System.Drawing.Size(75,23) $CancelButton.Text = "Cancel"
$CancelButton.Add_Click({$objForm.Close()})
$objForm.Controls.Add($CancelButton)

$objLabel = New-Object System.Windows.Forms.Label $objLabel.Location = New-Object System.Drawing.Size(10,20) $objLabel.Size = New-Object System.Drawing.Size(280,20) $objLabel.Text = "Please select a XenDesktop site"
$objForm.Controls.Add($objLabel)

$objListBox = New-Object System.Windows.Forms.ListBox $objListBox.Location = New-Object System.Drawing.Size(10,40) $objListBox.Size = New-Object System.Drawing.Size(260,20) $objListBox.Height = 80

Import-csv "C:\Scripts\input.txt" | ForEach-Object {[void] $objListBox .Items.Add($_.Site)}

$objForm.Controls.Add($objListBox)
$objForm.Topmost = $True
$objForm.Add_Shown({$objForm.Activate()})

[void] $objForm.ShowDialog()

# This pipes the chosen action from the imported CSV file
$XDSiteList
Viewing all 85 articles
Browse latest View live