Scripts and Other Utilities

All downloads are now on Citrix ShareFile.

Please ignore the Filename displayed for the download. WordPress is showing the ShareFile link and not the filename of the download.

All current documentation scripts require PowerShell Version 3 or later and create a Microsoft Word 2010 or 2013 document.

Most documentation scripts have been updated to support Word 2016.

Most documentation scripts will also create formatted text and HTML output so Microsoft Word is not required.

*****All scripts perform best with PowerShell Version 5*****

Each documentation script has either six or seven parts:

  1. ReadMe file
  2. Change Log
  3. Unsigned script with PS1 extension
  4. Unsigned script with TXT extension
  5. Signed script with PS1 extension
  6. Signed script with TXT extension
  7. Sample Software Exclusions file with TXT extension (XenApp scripts only)
Filename d-s17c25bd71b944c4b
Filesize 2 KB
Version 1.01 Previous versions
Date added November 2, 2017
Downloaded 141 times
Category XenApp Misc, XenDesktop Misc

Removes either:

A hosting connection and all resource connections in a Citrix  XenDesktop 7.xx Site if there are any active provisioning tasks or

A resource connection within a hosting connection that has the active task(s).

This script requires at least PowerShell version 3 but runs best in version 5.

You do NOT have to run this script on a Controller.

This script was developed and run from a Windows 10 VM.

You can run this script remotely using the -AdminAddress (AA) parameter.

This script supports all versions of XenApp/XenDesktop 7.xx.

Logs all actions to the Configuration Logging database.

If there are no active tasks for the hosting connection selected,  then NOTHING is removed from the Site. The script will state there were no active tasks found and end.

Supports WhatIf and Confirm thanks to @adbertram for his clear and simple articles.

The PowerShell WhatIf parameter

Confirm, $ConfirmPreference, and ConfirmImpact in PowerShell

Thanks to Michael B. Smith for the code review. @essentialexch on Twitter

*******************************************

* WARNING WARNING WARNING *

*******************************************

Do not run this script when there are valid active provisioning tasks processing.

Because of the way the Get-ProvTask cmdlet works, this script retrieves the first task where the Active property is TRUE, regardless of whether the task is a current task or an old task left in the system.

This script will remove the first active task it finds and then, depending on the -ResourceConnectionOnly switch, will attempt to delete all resource connections in the specified hosting connection and then attempt to delete the specified hosting connection.

*******************************************

* WARNING WARNING WARNING *

*******************************************