Category Archives: Citrix

‘New’ Item Cleaner

Introduction

The ‘New >‘ item on the right-click menu is quite handy.  It can list a huge amount of document types for you to create new documents.  Most of the time these work, other times they don’t.

 

Problem

As this list grows when new applications are installed, it rarely shrinks when an application is removed.  This can lead to dead links.

Another issue with this list is custom desktops for Citrix XenApp users, or other users on locked down, permissions based terminal servers.  There may be links in the list that a particular user doesn’t have access to.

nic-1

Solution

One solution is to just ignore it.  Users may log tickets sayinIg they can’t access an application they are not allowed to have, causing you to waste time and effort on chasing your tails.

While I was working with a particular Citrix XenApp install quite a few years ago, I created a script in KIX that would remove the entire list of applications, except for “Text Document”  I have recently updated this script for PowerShell and thought that I would share it with you.

nic-2

 As you can see from the screen shots, all the new document links have gone except for the only one we want.

 

The Script

The script is listed below…

Push-Location
Set-Location 'REGISTRY::HKEY_CLASSES_ROOT'
# Get all keys under the root branch...
$RegKeyItems = Get-ChildItem
ForEach ($RegKey in $RegKeyItems)
{
    # Check if it starts with a full stop "."
    If ($RegKey.PSChildName.StartsWith('.'))
    {
        # Get all keys under current branch...
        $RegSubKeyItems = Get-ChildItem -Path $RegKey.PSChildName
        ForEach ($RegSubKey in $RegSubKeyItems)
        {
            # Looking for "ShellNew"...
            If ($RegSubKey.PSChildName -eq 'ShellNew')
            {
                # Make sure not to remove Shortcut Links or Text Documents
                If (($RegKey.PSChildName -ne '.lnk') -and ($RegKey.PSChildName -ne '.txt'))
                {
                    # Display and delete key...
                    write-host "Deleting: $RegSubKey"
                    Remove-Item -Path \$RegSubKey -Recurse -ErrorAction SilentlyContinue
                }
                # Same as above, checking one level deeper...
                $RegSubSubKeyItems = Get-ChildItem -Path $RegSubKey.PSChildName -ErrorAction SilentlyContinue
                ForEach ($RegSubSubKey in $RegSubSubKeyItems)
                {
                    # Looking for "ShellNew"...
                    If ($RegSubSubKey.PSChildName -eq 'ShellNew')
                    {
                        # Make sure not to remove Shortcut Links or Text Documents
                        If (($RegSubKey.PSChildName -ne '.lnk') -and ($RegSubKey.PSChildName -ne '.txt'))
                        {
                            # Display and delete key...
                            write-host "Deleting: $RegSubSubKey"
                            Remove-Item -Path \$RegSubSubKey -Recurse -ErrorAction SilentlyContinue
                        }
                    }
                }
            }
        }
    }
}
# Also remove that annoying Briefcase link...
Remove-Item -Path '\Briefcase\ShellNew' -Recurse -ErrorAction SilentlyContinue
Pop-Location

 

If you have any suggestions for improvements, or want to share your tweaks, leave a comment below.

 

Download

download-fileNew Item Cleaner.ps1

 

Server Application Matrix

Introduction

Please Note: This is an old application I wrote in 2011.  It is no longer updated or supported.

This tool allows you to view exactly which applications are published on which servers within your Citrix Metaframe/Presentation Server/XenApp farm. Applications are shown in tree format as shown in the management console, and servers can be shown either alphabetically or grouped in their zones

Applications can also be published or unpublished from the farm with a simple click of the mouse – as long as editing is enabled first.
It should work with all versions of Citrix Presentation Server and XenApp prior to XenApp 6.

Please note, this will only shown what’s published, not installed.

 

Prerequisites

Most Microsoft Windows 2003 Servers should already have the required files installed by default. However, if this is not the case, the following links will help you download and install the pre-requisites…

 

Installation

  1. Download the ZIP file below and extract the file onto one of your Citrix farm servers or a network share,
  2. From one of your Presentation/XenApp servers, execute the extracted file,
  3. The following window will appear, with the current server name already filled in…

sam0

  1. Click the Build Matrix button and wait.
    Depending on the size of your farm, this could take a while. A progress counter will inform you of its status.
    Once complete, the window will change, and once resized it should show you something that looks like this…

sam1

 

Filtering

You can also filter the list or applications and servers that are shown…

sam3

Options

There are also a couple of options too…

sam2

 

Download

If you are interested in this tool, please download it from the link below…

download-filesam.zip