Citrix XenApp "Iron Cove" 6.5 Tech. Preview (Part.2)

· 22 min read

Citrix XenApp “Iron Cove” 6.5 Tech. Preview (Part.1)
Citrix XenApp “Iron Cove” 6.5 Tech. Preview (Part.2)
Citrix XenApp “Iron Cove” 6.5 Tech. Preview (Part.3)

In this blog, I will cover the new features, some are visual, some are not, I would like to go deeper on those change but I cannot find a lot of detailed information about Multi-Stream technology for example, I think I need to catch up with he product designer to know everything about everything. There are a lot of cool stuff and you need to think what it can bring you regarding your production, real life, experience.

First, when you’re done with the installation, when you check what’s in the start menu, you will find some new items :

  • Citrix Receiver is installed by default
  • Application Definition Tool is installed by default as well
  • The new migration tool Citrix XenApp Migration Center
  • And Citrix AppCenter, the new name for the Citrix Delivery Service Console

The new management console name is now Citrix AppCenter, it’s shorter than Citrix Delivery Service Console but it remain the same look and feel, by using it, I think it’s a faster than the previous one :

A number of PowerShell scripts are installed by default but not run to make the published desktop look like a Windows 7 desktop. You can find the script here : “C:Program Files (x86)CitrixApp Delivery Setup ToolsNew-CtxManagedDesktopGPO.ps1”

<#
 
.SYNOPSIS
Creates four Group Policy objects which control access to a user's desktop preferences.
Desktop preferences are defined to be managed centrally by an administrator or to be
user configurable.
 
.DESCRIPTION
Allows users to customize their workspace with background images, different mouse
pointers, etc., while restricting access to Computer Management, Task Manager, Scheduler,
and other system components. Part of a collection of PowerShell scripts
that provide a Windows 7 desktop look and feel in a XenApp environment.
 
A total of four Group Policy objects are created when the script is run:
CtxStartMenuTaskbarUser, CtxPersonalizableUser, CtxRestrictedComputer and CtxRestrictedUser.
 
Note that both success and failure of this script is recorded in the Windows Event log
under the event source CtxDesktopExperience. 
 
.PARAMETER Domain
Name of the Windows domain in which the Group Policy objects are created.
 
.PARAMETER ThemeFile
Full path to a Windows Theme file to use for new users. This parameter defaults to
the NewBasic.theme file created when the Install-CtxDesktopExperience.ps1 script is run.
 
.PARAMETER WallpaperFile
Full path to the Windows wallpaper that is applied to all users linked to the
CtxRestrictedUser GPO. By default, the wallpaper is set to a file containing the Citrix logo.
 
.PARAMETER InstallPath
Full path to the root of the Citrix install directory. The path stored at HKLM:SoftwareCitrixRolesConfigurationToolLocation (Note: SoftwareWow6432Node is referenced on a 64-bit OS) is used if no value is provided.
 
.PARAMETER Domain
Windows domain in which to store the Group Policy object. The domain to which the current computer
belongs is used if no value is provided.
 
.PARAMETER NameStartMenuTaskbarUserGPO
Name given to the GPO which contains Start Menu and Taskbar configuration.
The GPO is named CtxStartMenuTaskbarUser if an alternate name is not provided.
 
.PARAMETER NameRestrictedComputerGPO
Name given to the GPO that contains tight restrictions for a computer.
The GPO is named CtxRestrictedComputer if an alternate name is not provided.
 
.PARAMETER NamePersonalizableUserGPO
Name given to the GPO that contains moderate restrictions for a user.
The GPO is named CtxPersonalizableUser if an alternate name is not provided.
 
.PARAMETER NameRestrictedUserGPO
Name given to the GPO that contains tight restrictions for a user.
The GPO is named CtxRestrictedUser if an alternate name is not provided.
 
.EXAMPLE
New-CtxManagedDesktopGPO.ps1
 
.EXAMPLE
New-CtxManagedDesktopGPO.ps1 -Domain DomainName
 
.EXAMPLE
New-CtxManagedDesktopGPO.ps1 -ThemeFile "C:WindowsresourcesEase of Access Themescorp.theme" -WallpaperFile "c:Program Files (x86)CitrixApp Delivery Setup Toolscorp.jpg" -InstallPath "c:Program Files (x86)CitrixApp Delivery Setup Tools"
 
.EXAMPLE
New-CtxManagedDesktopGPO.ps1 -NameStartMenuTaskbarUserGPO CorpStartMenuTaskbarUser -NameRestrictedComputerGPO CorpRestrictedComputer -NamePersonalizableUserGPO CorpPersonalizableUser -NameRestrictedUserGPO CorpRestrictedUser
 
.NOTES
    KEYWORDS: powershell, terminal services, CSP, Desktop Experience
    REQUIRES:
    1. GroupPolicy Module
    2. Windows 2008 R2 or Windows 7
    3. PowerShell Version 2.0
    4. Computer joined to a Domain
 
    Microsoft Wallpaper defect:
    Windows Server 2008 R2 has a defect which, in some scenarios, prevents the wallpaper policy
    setting from being applied properly. Please see the following Microsoft Knowledge Base
    article for additional details:
 
 
    'Do not allow pinning to Taskbar' Policy Setting defect:
    The policy setting that prevents pinning to the taskbar will not work unless the
    hotfix described below is applied. Note that if the hotfix is installed the taskbar cannot
    be modified to look like a Windows 7 Desktop.
 
 
   GroupPolicy Module Installation:
   The New-CtxManagedDesktopGPO.ps1 script requires the GroupPolicy module be installed. If this module is
   not currently installed, perform one of the following procedures: 
 
   1. Windows Server 2008 R2 Domain Controller --or-- Windows Server 2008 R2 Member Server
   Install Group Policy Management Feature.
 
   2. Windows 7
   Install Remote Server Administration Tools (RSAT).
 
   Please see the following Microsoft article for additional details:
 
 
   Copyright © 2011 Citrix Systems, Inc. All rights reserved.
 
.LINK
 
#>
 
Param(
  [Parameter(Mandatory=$false, HelpMessage="Full path to Windows theme file.")]
  [Alias("Theme")]
  [string]$ThemeFile = "%windir%resourcesEase of Access ThemesNewBasic.theme",
  [Parameter(Mandatory=$false, HelpMessage="Full path to Windows wallpaper.")]
  [Alias("Wallpaper")]
  [string]$WallpaperFile = "%ProgramFiles(x86)%CitrixApp Delivery Setup Toolscitrix_logo.jpg",
  [Parameter(Mandatory=$false, HelpMessage="Full path to the root of the Citrix install directory.")]
  [Alias("Install")]
  [string]$InstallPath,
  [Parameter(Mandatory=$false, HelpMessage="Windows domain to store Group Policy object.")]
  [string]$Domain = $env:USERDNSDOMAIN,
  [Parameter(Mandatory=$false, HelpMessage="Name given to the GPO that contains Start Menu and Taskbar configuration for a user.")]
  [Alias("StartMenuGPO")]
  [string]$NameStartMenuTaskbarUserGPO = "CtxStartMenuTaskbarUser",
  [Parameter(Mandatory=$false, HelpMessage="Name given to the GPO that contains moderate restrictions for a computer.")]
  [Alias("RestrictedComputerGPO")]
  [string]$NameRestrictedComputerGPO = "CtxRestrictedComputer",
  [Parameter(Mandatory=$false, HelpMessage="Name given to the GPO that contains moderate restrictions for a user.")]
  [Alias("PersonalizableUserGPO")]
  [string]$NamePersonalizableUserGPO = "CtxPersonalizableUser",
  [Parameter(Mandatory=$false, HelpMessage="Name given to the GPO that contains tight restrictions for a user.")]
  [Alias("RestrictedUserGPO")]
  [string]$NameRestrictedUserGPO = "CtxRestrictedUser"
) #end param
 
<#
.DESCRIPTION
Determine if the administrator wishes to correct the issue or abort the script. Called if an error is detected when trying to create the GPO.
#>
Function Read-GPOName
{
Param (
[string]$Caption,
[string]$Message,
[REF]$Name
)
    New-Variable cancelSelection -Value 0 -Option ReadOnly
    New-Variable overwriteSelection -Value 1 -Option ReadOnly
    New-Variable alternateNameSelection -Value 2 -Option ReadOnly
 
    $retry = $TRUE
 
    $choices = [System.Management.Automation.Host.ChoiceDescription[]] @("&Cancel", "&Overwrite", "&New Name")
    [int]$defaultChoice = $alternateNameSelection
    $selection = $host.ui.PromptForChoice($caption, $message, $choices, $defaultChoice)
 
     switch ($selection) {
        $cancelSelection {
           Write-Host "Canceling ..."
           $retry = $FALSE
        }
        $overwriteSelection {
           Write-Host "Overwriting $nameTemp ..."
           Remove-GPO -Domain $Domain -KeepLinks  -Name $Name.Value
        }
        $alternateNameSelection {
           $newName = Read-Host "New name for GPO $nameTemp." -ErrorAction Continue
 
           $Name.Value = $newName
        }
     }
 
     return $retry
}
<#
.DESCRIPTION
Provides extended New-GPO functionality including confirmation and validation.
#>
Function New-GPOEx
{
Param (
[REF]$Name,
[string]$Domain = $env:USERDNSDOMAIN,
[string]$Comment = "Citrix GPO"
)
   New-Variable gpo -Value $null
   $retry = $true
 
   do {
      try {
          $nameTemp = $Name.Value
 
          $gpo = new-gpo -Domain $Domain -Name $Name.Value -Comment $Comment
          Write-Host "Created New GPO $nameTemp." 
 
          $retry = $false
       } catch [System.Runtime.InteropServices.ExternalException] {
          # Domain couldn't be contacted
          if ($_.Exception.ErrorCode -eq 0x8007054B) {
              $exception = new-object System.ApplicationException("Domain $Domain could not be contacted.", $_.Exception)
              Write-Error -Exception $exception -Category ResourceUnavailable -ErrorId System.ApplicationException.DomainNotAvailable
          } else {
              throw
          }
      } catch [System.SystemException] {
          # GPO Already Exists
          if ($_.FullyQualifiedErrorId -eq "GpoWithNameAlreadyExists,Microsoft.GroupPolicy.Commands.NewGpoCommand") {
              $caption = "Group Policy Object Already Exists"
              $message = "GPO $nameTemp already exists. $Comment"
 
              $retry = Read-GPOName -Caption $caption -Message $message -Name $Name
          # GPO Name not provided
          } elseif ($Name.Value -eq "" -or $Name.Value -eq $NULL) {
              $caption = "No Name Provided for Group Policy Object"
              $message = "Please provide a name for the GPO. $Comment"
 
              $retry = Read-GPOName -Caption $caption -Message $message -Name $Name
          } else {
              throw
          }
      } catch {
         throw
      }
   } while ($retry)
 
   return $gpo
}
 
<#
.DESCRIPTION
Provides extended Copy-GPO functionality including confirmation and validation.
#>
Function Copy-GPOEx
{
Param (
[string]$SourceName,
[REF]$TargetName,
[string]$Domain = $env:USERDNSDOMAIN,
[string]$Comment = "Citrix GPO"
)
 
   [string]$targetNameTemp = $TargetName.Value
   Write-Host "Copying GPO $SourceName to $targetNameTemp."
 
   $gpo = New-GPOEx -Domain $Domain -Name $TargetName -Comment $Comment
 
   if ($gpo -ne $null) {
      $gpo = $null
      Remove-GPO -Domain $Domain -KeepLinks -Name $TargetName.Value
      $gpo = Copy-GPO -SourceName $SourceName -TargetName $TargetName.Value
   }
 
   return $gpo
}
 
<#
.DESCRIPTION
Provides extended Import-GPO functionality including confirmation and validation.
#>
Function Import-GPOEx
{
Param (
[string]$SourceName,
[REF]$TargetName,
[string]$BackupGpoName,
[string]$Path,
[string]$Domain = $env:USERDNSDOMAIN,
[string]$Comment = "Citrix GPO"
)
 
   [string]$targetNameTemp = $TargetName.Value
   Write-Host "Importing GPO $SourceName to $targetNameTemp"
 
   $gpo = New-GPOEx -Domain $Domain -Name $TargetName -Comment $Comment
 
   if ($gpo -ne $null) {
      $gpo = $null
      Remove-GPO -Domain $Domain -KeepLinks  -Name $TargetName.Value
      $gpo = Import-GPO -BackupGpoName $BackupGpoName -CreateIfNeeded -Domain $Domain -TargetName $TargetName.Value -Path $Path
   }
 
   return $gpo
}
 
<#
.DESCRIPTION
Provides extended Set-GPRegistryValue functionality including validation.
#>
Function Set-GPRegistryValueEx
{
Param (
   [string]$Key,
   [psobject]$Type,
   [psobject]$Value,
   [string]$ValueName,
   [psobject]$GPO
)
 
   Write-Host "Setting Policy Value Key:$Key Name:$ValueName Type:$Type Value:$Value"
   $GPO | Set-GPRegistryValue -Key $Key -Type $Type -Value $Value -ValueName $ValueName | Out-Null
}
 
<#
.DESCRIPTION
Provides extended Remove-GPRegistryValue functionality including validation.
#>
Function Remove-GPRegistryValueEx
{
Param (
   [string]$Key,
   [string]$ValueName,
   [psobject]$GPO
)
 
   Write-Host "Removing Policy Value Key:$Key Name:$ValueName"
   $GPO | Remove-GPRegistryValue -Key $Key -ValueName $ValueName | Out-Null
}
 
<#
.DESCRIPTION
Provides extended Set-GPPrefRegistryValue functionality including validation.
#>
Function Set-GPPrefRegistryValueEx
{
Param (
   [psobject]$Action,
   [psobject]$Context,
   [string]$Key,
   [psobject]$Type,
   [psobject]$Value,
   [string]$ValueName,
   [psobject]$GPO
)
 
   Write-Host "Setting Policy Preference Action:$Action Key:$Key Type:$Type Value:$Value Name:$ValueName"
   $GPO | Set-GPPrefRegistryValue -Action $Action -Context $Context -Key $Key -Type $Type -Value $Value -ValueName $ValueName | Out-Null
}
 
<#
.DESCRIPTION
Add over 60 policy settings to three different group policy objects.
#>
Function Set-PolicySettings
{
   # ######################
   # GPO Restrictions
   Write-Host "Setting policy settings for $NamePersonalizableUserGPO."
 
   # set desktop theme which can be changed by the user
   Set-GPRegistryValueEx -Key "HKCUSoftwarePoliciesMicrosoftWindowsPersonalization" -Type String -ValueName ThemeFile -Value $ThemeFile -GPO $gpoPersonalizableUser
 
   # Prevent Users from Reconfiguring the Server
   # Hide some control panels (all except personalization)
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "RestrictCpl" -Type DWORD -Value 4  -GPO $gpoPersonalizableUser
   # WARNING if you change the IDs for 2,5, 14, 15, 16 to another number you will need to update the code for the restricted user below which removes the itemes
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "2" -Type String -Value "Taskbar and Start Menu"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "3" -Type String -Value "Default Programs"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "4" -Type String -Value "Keyboard"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "5" -Type String -Value "Notification Area Icons"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "6" -Type String -Value "Sound"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "7" -Type String -Value "Text to Speech"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "8" -Type String -Value "Ease of Access Center"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName  "9" -Type String -Value "Internet Options"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "10" -Type String -Value "Mouse"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "11" -Type String -Value "Region and Language"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "12" -Type String -Value "Folder Options"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "13" -Type String -Value "Credential Manager"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "14" -Type String -Value "Personalization"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "15" -Type String -Value "Devices and Printers"  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "16" -Type String -Value "User Accounts"  -GPO $gpoPersonalizableUser
 
   # Remove Add or Remove Programs
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesUninstall" -ValueName "NoAddRemovePrograms" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesUninstall" -ValueName "NoAddFromCDorFloppy" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesUninstall" -ValueName "NoAddFromNetwork" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesUninstall" -ValueName "NoChooseProgramsPage" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesUninstall" -ValueName "NoRemovePage" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesUninstall" -ValueName "NoWindowsSetupPage" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Hide "Programs and Features" page
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesPrograms" -ValueName "NoProgramsAndFeatures" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Prevent access to registry editing tools
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem" -ValueName "DisableRegistryTools" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Prevent Access to Windows Automatic Updates
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesWindowsUpdate" -ValueName "DisableWindowsUpdateAccess" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesWindowsUpdate" -ValueName "DisableWindowsUpdateAccessMode" -Type DWORD -Value 0  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwarePoliciesMicrosoftWindowsWindowsUpdateAU" -ValueName "NoAUShutdownOption" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
   Set-GPRegistryValueEx -Key "HKCUSoftwarePoliciesMicrosoftWindowsWindowsUpdateAU" -ValueName "NoAUAsDefaultShutdownOption" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Remove Shutdown from Start Menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoClose" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Remove Run Menu From The Start Menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoRun" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # * Remove links and access to Windows Update
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoWindowsUpdate" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # * Remove Help menu from Start Menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoSMHelp" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # * Remove Access to Task Manager
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem" -ValueName "DisableTaskMgr" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Restrict Access to Internet Explorer and the Internet
   # * Disable Changing Proxy Settings
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftInternet ExplorerControl Panel" -ValueName "Proxy" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # * Disable The Advanced Page security settings?
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftInternet ExplorerControl Panel" -ValueName "AdvancedTab" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # * Disable The Connections Page  VPN? Proxy?
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftInternet ExplorerControl Panel" -ValueName "ConnectionsTab" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # * Disable The Programs Page browser plugins?
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftInternet ExplorerControl Panel" -ValueName "ProgramsTab" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Disable Security Page
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftInternet ExplorerControl Panel" -ValueName "SecurityTab" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Remove Windows Explorer Security Tab  This policy removes the Security tab from Windows Explorer. If users can open the Properties dialog box for file system objects, including folders, files, shortcuts, and drives, they cannot access the Security tab. It is recommended that you enable this policy to prevent users from changing the security settings or viewing a list of all users who have access to the object
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoSecurityTab" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Hides the Manage item on the Windows Explorer shortcut menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoManageMyComputerVerb" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Remove Hardware tab  This policy removes the Hardware tab from Mouse, Keyboard, and Sounds and Audio Devices in Control Panel.
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoHardwareTab" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # MMC
   # Restrict users to the explicitly permitted list of snap-Ins
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftMMC" -ValueName "RestrictToPermittedSnapins" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Task Scheduler
   # Prohibit Task Deletion
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftWindowsTask Scheduler5.0" -ValueName "Task Deletion" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Prevent Task Run or End
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftWindowsTask Scheduler5.0" -ValueName "Execution" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Prohibit New Task Creation
   Set-GPRegistryValueEx  -Key "HKCUSoftwarePoliciesMicrosoftWindowsTask Scheduler5.0" -ValueName "Task Creation" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Desktop
   # Remove Network Icon
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "HideSCANetwork" -Type DWORD -Value 1 -GPO $gpoPersonalizableUser
 
   # Remove Action Center Icon
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "HideSCAHealth" -Type DWORD -Value 1 -GPO $gpoPersonalizableUser
 
   # Remove Properties from My Documents shortcut menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoPropertiesMyDocuments" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Remove Properties from My Computer shortcut menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoPropertiesMyComputer" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   # Remove Properties from Recycle Bin shortcut menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoPropertiesRecycleBin" -Type DWORD -Value 1  -GPO $gpoPersonalizableUser
 
   Write-Host "Setting policy settings for $NameRestrictedComputerGPO."   
 
   # Prevent addition of printers
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "DomainADprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "DomainIPprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "DomainWSDprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "DomainBluetoothprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "DomainShareprinters"  -GPO $gpoRestrictedComputer
 
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "NonDomainIPprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "NonDomainWSDprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "NonDomainBluetoothprinters"  -GPO $gpoRestrictedComputer
   Set-GPPrefRegistryValueEx -Action Delete -Context Computer -Key "HKLMSoftwarePoliciesMicrosoftWindows NTPrintersWizard" -Type String -Value "" -ValueName "NonDomainShareprinters"  -GPO $gpoRestrictedComputer
 
   # Prevent Access to Windows Automatic Updates
   Set-GPRegistryValueEx -Key "HKLMSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoMSAppLogo5ChannelNotify" -Type DWORD -Value 1  -GPO $gpoRestrictedComputer
   Set-GPRegistryValueEx -Key "HKLMSoftwarePoliciesMicrosoftWindowsDriverSearching" -ValueName "DontPromptForWindowsUpdate" -Type DWORD -Value 1  -GPO $gpoRestrictedComputer
   Set-GPRegistryValueEx -Key "HKLMSoftwarePoliciesMicrosoftWindowsDriverSearching" -ValueName "DontSearchWindowsUpdate" -Type DWORD -Value 1  -GPO $gpoRestrictedComputer
 
   # * Disable Help and Support Center service
   Set-GPRegistryValueEx  -Key "HKLMSoftwarePoliciesMicrosoftPCHealthHelpSvc" -ValueName "Headlines" -Type DWORD -Value 0  -GPO $gpoRestrictedComputer
   Set-GPRegistryValueEx  -Key "HKLMSoftwarePoliciesMicrosoftPCHealthHelpSvc" -ValueName "MicrosoftKBSearch" -Type DWORD -Value 0  -GPO $gpoRestrictedComputer
 
   # * Restrict Access to CD-ROM and Floppy Drives
   Set-GPRegistryValueEx  -Key "HKLMSoftwarePoliciesMicrosoftWindowsRemovableStorageDevices" -ValueName "AllowRemoteDASD" -Type DWORD -Value 0  -GPO $gpoRestrictedComputer
   Set-GPRegistryValueEx  -Key "HKLMSoftwarePoliciesMicrosoftWindowsRemovableStorageDevices" -ValueName "Deny_All" -Type DWORD -Value 1  -GPO $gpoRestrictedComputer
 
   # #######################
   # GPO Restricted
   $gpoRestrictedUser = Copy-GPOEx -SourceName $NamePersonalizableUserGPO -TargetName ([REF]$NameRestrictedUserGPO)
 
   Write-Host "Setting policy settings for $NameRestrictedUserGPO."
   # Prevent user from changing Theme
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoThemesTab" -Type DWORD -Value 1 -GPO $gpoRestrictedUser
 
   # Prevent Changes To Taskbar And Start Menu Settings
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoSetTaskbar" -Type DWORD -Value 1 -GPO $gpoRestrictedUser
 
   # Remove The Pinned Programs List From The Start Menu
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoStartMenuPinnedList" -Type DWORD -Value 1 -GPO $gpoRestrictedUser
 
   # * Remove Drag And Drop Context Menus On The Start Menu
   Set-GPRegistryValueEx  -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer" -ValueName "NoChangeStartMenu" -Type DWORD -Value 1 -GPO $gpoRestrictedUser
 
   # Enforce Wallpaper Selection
   Set-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem" -ValueName "Wallpaper" -Type String -Value $WallpaperFile -GPO $gpoRestrictedUser
 
   # Delete the group policy setting which shows Taskbar and Start Menu from Control Panel
   Remove-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "2" -GPO $gpoRestrictedUser
 
   # Delete the group policy setting which shows Notification Area Icons from Control Panel
   Remove-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "5" -GPO $gpoRestrictedUser
 
   # Delete the group policy setting which shows Personalization from Control Panel
   Remove-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "14" -GPO $gpoRestrictedUser
 
   # Delete the group policy setting which shows Devices and Printers from Control Panel
   Remove-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "15" -GPO $gpoRestrictedUser
 
   # Delete the group policy setting which shows User Accounts from Control Panel
   Remove-GPRegistryValueEx -Key "HKCUSoftwareMicrosoftWindowsCurrentVersionPoliciesExplorerRestrictCpl" -ValueName "16" -GPO $gpoRestrictedUser
}
 
<#
.DESCRIPTION
Retrieve install path from registry location
 
   HKLM:SoftwareCitrixRolesXenAppConfigurationToolLocation (Note: SoftwareWow6432Node is referenced on a 64-bit OS)
#>
Function Get-ConfigurationToolLocation() {
Param (
[REF]$ConfigurationToolLocation
)
    # 64-Bit machine?
    if(Test-Path "HKLM:SoftwareWow6432NodeCitrixRolesXenApp")
    {
        $registryValue = Get-ItemProperty -Path "HKLM:SoftwareWow6432NodeCitrixRolesXenApp" -Name ConfigurationToolLocation
        $ConfigurationToolLocation.Value = $registryValue.ConfigurationToolLocation
    }
    # Check if we're installed properly on 32-bit machine
    elseif(Test-Path "HKLM:SoftwareCitrixRolesXenApp")
    {
        $registryValue = Get-ItemProperty -Path "HKLM:SoftwareCitrixRolesXenApp" -Name ConfigurationToolLocation
        $ConfigurationToolLocation.Value = $registryValue.ConfigurationToolLocation
    }
    # Time for a friendly exception message
    else
    {
        $exception = new-object System.ApplicationException("Failed to retrieve the installtion path from the registry. It appears that the MSI was not used to install the scripts. Either specify the install path using the InstallPath parameter or install the scripts using the EnhancedDesktopSetup.msi.")
        Write-Error -Exception $exception -Category ResourceUnavailable -ErrorId System.ApplicationException.ConfigurationToolLocationRegistryValueNotFound
    }
} 
 
# *** ENTRY POINT TO SCRIPT ***
Set-StrictMode -version 2
$ErrorView = "CategoryView"
$errorActionPreferenceOld = $errorActionPreference
$errorActionPreference = "Stop"
 
$exitCode = 0
$success = $FALSE
$abortScript = $FALSE
 
Write-Host "Creating the Group Policy objects for the Enhanced Desktop Experience feature."
 
try {
   New-EventLog -Logname application -Source CtxDesktopExperience -ErrorAction SilentlyContinue
 
   [string]$cmdLine = $myInvocation.Line
   Write-EventLog -LogName application -Source CtxDesktopExperience -EntryType information -EventId 5005 -Message "Creating GPOs to manage Enhanced Desktop Experience: $cmdLine"
 
   try
   {      import-module grouppolicy   }
   catch
   {
       # Test to see if the Exception is Wrapped within an Error Record
	   $errorException = Get-Member -InputObject $_ -Name Exception
 
	   if($errorException -and $_.Exception.GetType().Name -eq "FileNotFoundException")
	   {
            $exception = new-object System.IO.FileNotFoundException("The GroupPolicy PowerShell Module is not installed. Please see the Notes within section `"GroupPolicy Module Installation`" of the script help (Get-Help New-CtxManagedDesktopGPO.ps1 -Full).", $_.Exception)
      		Write-Error -Exception $exception -Category ResourceUnavailable -ErrorId System.IO.FileNotFoundException.GroupPolicyPowerShellModuleNotFound
	   }
       else # someother fatal error
       { throw $_ }
   }
 
   if ($InstallPath -eq "") {
      Get-ConfigurationToolLocation ([REF]$InstallPath)
   }
 
   # ###############
   # Check various supporting files and directories (install and gpo backup) are valid
   # Note: Wallpaper and theme file names are checked for proper format; but their existence is not; since these paths are only valid in the policy consumer's session and
   # in many cases only after windows command processor has interpreted the command.
   Write-Host "Validating install and GPO backup paths provided."
 
   if (!(Test-Path -LiteralPath $ThemeFile -PathType Leaf -IsValid)) {
      $exception = new-object System.FormatException("Theme File name is invalid: $ThemeFile")
      Write-Error -Exception $exception -Category InvalidArgument -ErrorId System.FormatException.ThemeFileArgumentInvalid
   }
 
   if (!(Test-Path -LiteralPath $WallpaperFile -PathType Leaf -IsValid)) {
      $exception = new-object System.FormatException("Wallpaper File name is invalid: $WallpaperFile")
      Write-Error -Exception $exception -Category InvalidArgument -ErrorId System.FormatException.WallpaperFileArgumentInvalid
   }
 
   if (!(Test-Path -LiteralPath $InstallPath -PathType Container)) {
      $exception = new-object  System.IO.DirectoryNotFoundException("Citrix Enhanced Desktop Experience install path is not accessible: $InstallPath")
      Write-Error -Exception $exception -Category ResourceUnavailable -ErrorId System.IO.DirectoryNotFoundException.EnhancedDesktopExperienceInstallPathNotFound
   }
 
   if (!(Test-Path -LiteralPath $InstallPathGroupPolicyObjectsCtxStartMenuTaskbarUser -PathType Container)) {
      $exception = new-object System.IO.DirectoryNotFoundException("The path containing the CtxStartMenuTaskbarUser GPO is not accessible: $InstallPathGroupPolicyObjectsCtxStartMenuTaskbarUser")
      Write-Error -Exception $exception -Category ResourceUnavailable -ErrorId System.IO.DirectoryNotFoundException.CtxStartMenuTaskbarUserPathNotFound
   }
 
   Write-Host "Changing working directory $InstallPath."
   Push-Location
   Set-Location $InstallPath
 
   # ###############
   # Create all GPO Objects early to ensure we have the right permissions and that the GPOs don't already exist
   Write-Host "Testing if GPOs ($NamePersonalizableUserGPO, $NameRestrictedUserGPO, $NameRestrictedComputerGPO, and $NameStartMenuTaskbarUserGPO.) can be created."
 
   $gpoStartMenuTaskbarUser = Import-GPOEx  -BackupGpoName CtxStartMenuTaskbarUser -Domain $Domain -TargetName ([REF]$NameStartMenuTaskbarUserGPO) -Path $InstallPathGroupPolicyObjectsCtxStartMenuTaskbarUser -Comment "This GPO configures a user's Start Menu."
   if ($gpoStartMenuTaskbarUser -eq $null) {
      $abortScript = $TRUE
   } else {
      $gpoStartMenuTaskbarUser = $null
   }
 
   if (!$abortScript) {
      $gpoRestrictedUser = New-GPOEx -Domain $Domain -Name ([REF]$NameRestrictedUserGPO) -Comment "This GPO provides tight restrictions for a user's desktop configuration."
      if ($gpoRestrictedUser -eq $null) {
         Write-Warning "Aborting Script"
         $abortScript = $TRUE
      } else {
         Remove-GPO -Domain $Domain -KeepLinks  -Name $gpoRestrictedUser.DisplayName
         $gpoRestrictedUser = $null
      }
   }
 
   if (!$abortScript) {
      $gpoRestrictedComputer = New-GPOEx -Domain $Domain -Name ([REF]$NameRestrictedComputerGPO) -Comment "This GPO provides tight restrictions for a computer's configuration."
      if ($gpoRestrictedComputer -eq $null) {
         $abortScript = $TRUE
      }
   }
 
   if (!$abortScript) {
      $gpoPersonalizableUser = New-GPOEx -Domain $Domain -Name ([REF]$NamePersonalizableUserGPO) -Comment "This GPO provides moderate restrictions for a user's desktop configuration."
      if ($gpoPersonalizableUser -eq $null) {
         $abortScript = $TRUE
      }
   }
 
   if (!$abortScript) {
      Set-PolicySettings
      $success = $TRUE
   }
} catch {
   $success = $FALSE
   $errorRecord = $_
} finally {
   $errorActionPreference = $errorActionPreferenceOld
   Pop-Location
}
 
Write-Host "`n"
 
if ($success) {
   Write-Host "The Group Policy objects, which manage a user's desktop configuration, have been successfully created."
   Write-Host "The following GPOs will need to be linked to the appropriate OUs:"
   Write-Host "$NamePersonalizableUserGPO, $NameRestrictedUserGPO, $NameRestrictedComputerGPO, and $NameStartMenuTaskbarUserGPO"
 
   Write-EventLog -LogName application -Source CtxDesktopExperience -EntryType information -EventId 5000 -Message "New-CtxManagedDesktopGPO: The Group Policy objects, which manage a user's desktop configuration, have been successfully created."
} else {
   # Note that the GPOs created during the session are not removed if an error is detected
   # since their contents may aid in determining the cause of the failure. Also, removal may
   # change the interaction between the administrator and the script causing confusion.
 
   if ($abortScript) {
      $exitCode = 0
      Write-Host "The script was canceled by the user."
      Write-EventLog -LogName application -Source CtxDesktopExperience -EntryType information -EventId 5002 -Message "New-CtxManagedDesktopGPO: The script was canceled by the user."
   } else {
 
      if ($errorRecord) {
         [string]$exceptionMsg = "Details of the error detected can be found below: `n"
                $exceptionMsg += "------------------------------------------------- `n"
 
         $exceptionMsg += "FullyQualifiedErrorId: "
         $exceptionMsg += $errorRecord.FullyQualifiedErrorId
         $exceptionMsg += "`n`n"
         $exceptionMsg += "Exception:`n"
         $exceptionMsg += $errorRecord.Exception
         $exceptionMsg += "`n`n"
         $exceptionMsg += "InvocationInfo:`n"
         $exceptionMsg +=  $errorRecord.InvocationInfo.PositionMessage
         $exceptionMsg += "`n`n"
         $exceptionMsg += "BoundParameters:`n"
         $exceptionMsg +=  $errorRecord.InvocationInfo.BoundParameters
         $exceptionMsg += "`n`n"
         $exceptionMsg += "UnboundArguments:`n"
         $exceptionMsg +=  $errorRecord.InvocationInfo.UnboundArguments
         $exceptionMsg += "`n`n"
         $exceptionMsg += "TargetObject:`n"
         $exceptionMsg += $errorRecord.TargetObject
 
         Write-Host "Not all of the Group Policy objects which manage a user's desktop could be successfully created." -ForegroundColor Red
         Write-EventLog -LogName application -Source CtxDesktopExperience -EntryType error -EventId 5001 -Message "New-CtxManagedDesktopGPO: Not all of the Group Policy Objects which manage a user's desktop could be successfully created. `n`n$exceptionMsg"
         throw $errorRecord.Exception
      } else {
         Write-Warning "Not all of the tasks could be completed successfully."
 
         Write-Host "The Group Policy objects, which manage a user's desktop configuration, have been successfully created."
         Write-Host "The following GPOs will need to be linked to the appropriate OUs:"
         Write-Host "$NamePersonalizableUserGPO, $NameRestrictedUserGPO, $NameRestrictedComputerGPO, and $NameStartMenuTaskbarUserGPO"
 
         Write-EventLog -LogName application -Source CtxDesktopExperience -EntryType warning -EventId 5003 -Message "New-CtxManagedDesktopGPO: Not all of the tasks could be completed successfully."
         Write-EventLog -LogName application -Source CtxDesktopExperience -EntryType information -EventId 5000 -Message "New-CtxManagedDesktopGPO: The Group Policy objects, which manage a user's desktop configuration, have been successfully created."
      }
 
      $exitCode = 2
   }
}
 
Exit $exitCode
 
# SIG # Begin signature block
# MIIXsAYJKoZI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Y29tMA0GCSqGSIb3DQEBAQUABIIB
# ACVGHGIMNclHwI6ToFVnpdMfvsgtb1b92dmUl72rT1+ZOy6S6/PeOTAhUbXhVMW0
# gzP5VXAy1Ai1WzG+ns9yHykD6BmWvVKNmO8M/zReTmUGcIN/6jGx78pK0nMc5rwI
# /JIoA3rvuUzTTft231S/01scxsVeC87WW3aHf1UHD6si0D00yYM9kVvuCcUEK9OZ
# kgVu1F2AlyVL/RnRlD8X0AsbEwjmuA2BdIftl6uGCIZdgWZ7L7P0lRlFmT8QwROC
# Sy/sQWYFkoyNBoIq/GEPhs3EU6oDFLMBEK6Zsrgs7U54h5UlrpVYp1X0dd6TQ/bt
# 1ZRuD7ONmt0PXgLT17ivHXOhggF/MIIBewYJKoZIhvcNAQkGMYIBbDCCAWgCAQEw
# ZzBTMQswCQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xKzApBgNV
# BAMTIlZlcmlTaWduIFRpbWUgU3RhbXBpbmcgU2VydmljZXMgQ0ECEDgl1/r4Ya+e
# 9JDnJrXWWtUwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEw
# HAYJKoZIhvcNAQkFMQ8XDTExMDMzMDE5MzI0MFowIwYJKoZIhvcNAQkEMRYEFEM5
# ifBb4/DnOa4nw0nr/uMk3JpJMA0GCSqGSIb3DQEBAQUABIGALqLdbtkitP/lV0f0
# eFEnt0l7W57C/CJRVLm1qR5wG2S4baRcr9Eo2dulQrflQyxNe4mGsGEF1Pj0pNfw
# SoFnDR1D7Pi7u8UsvllIXVx3YqCwMnTA3B8nGU8FCUXZ7UuyM9jKtuUfbPp3BFnW
# 96ywBz8AESHxS+bwZPdNiG27zj4=
# SIG # End signature block

Ensure to follow the next step if you want to try it :

  1. Run the New-CtxManagedDesktopGPO.ps1 script at the PowerShell command line. This script creates the following GPOs:
    • CtxStartMenuTaskbarUser enables the Windows 7 look and feel for published desktops. It also changes the pinned shortcuts on the Taskbar and configures the user’s Start menu to match the Windows 7 environment. This GPO includes a script that executes when a user logs on to the server for the first time. To ensure the script executes correctly, the PowerShell execution policy on the server must be set to AllSigned.
    • CtxPersonalizableUser configures the user account that is accessing the XenApp server. It configures Windows policies to limit the available Control Panel applets and restricts users from installing programs, viewing properties, scheduling tasks, or shutting down the server.
    • CtxRestrictedUser includes most of the policies from the CtxPersonalizableUser GPO. Additionally, this GPO configures the Desktop wallpaper policy to prevent users from personalizing their desktops and prevents users from modifying settings for the Start menu and Taskbar.
    • CtxRestrictedComputer configures certain restrictions on the XenApp servers allocated to the tenant. This GPO restricts users from accessing Windows Update or removable server drives.
  2. In the Active Directory Users and Computers console, link the User GPOs to the OU containing the tenant’s user accounts.
  3. Link the CtxRestrictedComputer GPO to the OU containing the XenApp servers allocated to the tenant.
  4. In the Group Policy Management Editor, for each User GPO, add the user accounts to the GPO’s scope.
  5. Add the XenApp servers to the scope of the CtxRestrictedComputer GPO.

Before the script execution :

After Execution and configuration as explained :

I’m glad to see Citrix went a bit further with desktop personalization and give us a very useful script, feel free to adapt and change it, I already made several change.

Several changes have been made around new policies and a new tab appear here template

Policy templates allow you to configure Citrix policies quickly and deploy them to your XenApp environment. Templates consist of pre-configured settings that can apply to a server or to a user session. You can use templates in the following ways:

  • As a source for creating other policies
  • As a tool with which to compare existing policies
  • As a method for delivering or receiving policy configurations from Citrix Support or trusted third parties
You can perform the following tasks with policy templates:

  • Create new templates using existing templates or policies
  • Create new policies using existing templates
  • Import and export templates
  • Compare settings, including default values, of selected policies and templates

then a lot of new computer and user policies appear to integrate what we were force to script before like Capacity and Power Management options, and some other to configure the new options available with XenApp 6.5 :

(more…)