Unable to Delete Resources: There is currently an active background action

An addition to CTX138318 about how to delete an old Citrix Studio Hosting connection.
Instead of deleting every task manually we make use of PowerShell piping and Out-GridView.

Today in Citrix Studio I discovered a dead Hosting connection I set up years ago for some MCS tests. When I tried to simply delete the connection, I received the following message:

The error message leads to the following (helpful!) KB article: CTX138318

After following the different steps outlined in the article …

… I ended up with something like this:

Which I should process via:

Which I didn’t want to do manually for each entry. But I remembered the session from Andreas Nick at the TecCon2018, where he showed examples about how to pipe the output of a command to a select grid. I’m not good at PowerShell at all, but I wanted to try it anyways. So after two hours of straight web research I ended up with the following code, which simplified this process a lot!

To explain each step in detail:

Line 1 Make PowerShell aware of the Citrix cmdlets.
Line 2 Switch to the Hypervisor Hosting connections of XenDesktop.
Line 3 Write the HostingUnitUid of the affected connection into a variable after a GridView Select.
Line 4 Create a list of all pending tasks and …
Line 5 Present it in a second GridView Select so you could delete all or selected tasks. The selection is being piped to the Remove command.

This will look similar to this:

In the Out-GridView you will first select the affected Hosting connection and in the second windows you will select all ProvTasks you may want to remove. Most of the time this will be all. There are certainly better ways to solve this, but the intend of this post is just to show you with how little work a repetitive task can be optimized with simple PowerShell tricks.

This worked great for me, but you should test this first!

Sometimes it can happen, that a ProvTask is “Running” and you can’t remove it. For this case I found a hint at discussions.citrix.com linked at the bottom.


This post was previously posted on mycugc.org.

ICYMI: A few notes about the Citrix Receiver Clean-Up Utility

The Citrix Receiver Clean-Up Utility is no longer needed, as it’s part of the CitrixReceiver.exe nowadays.

The Citrix Receiver Clean-Up Utility has been my biggest friend for a while. It helps you to recover broken Citrix Receiver installations on Microsoft Windows. Before I knew it, I sometimes even reinstalled Windows to get Citrix Receiver back to work. Good old days.
But after many years a trustful friendship came to an end. Citrix included the functionality of the Receiver Clean-Up Utility into the Citrix Receiver Setup a while ago. Continue reading “ICYMI: A few notes about the Citrix Receiver Clean-Up Utility”

HowTo: Update Citrix Workspace Environment Management from 4.x to 4.4 (v4.04.00.00)

A short HowTo about the Citrix WEM Upgrade process for version 4.4

Download Citrix WEM 4.4 (v4.04.00.00) here:

What’s new:

Continue reading “HowTo: Update Citrix Workspace Environment Management from 4.x to 4.4 (v4.04.00.00)”

Tablacus Explorer is an awesome replacement for explorer.exe as a #XenApp published Application!

In XenApp projects you always face the challenge to decide whether to deploy a published Desktop or different published applications for the users. Many times you will have to use a combination of both. Especially in the published application use-case, you have to find a way to allow your users manage their files with a file explorer. This might not be a problem for Fat-Client users with their Windows 10 Notebooks inside the corporate LAN. Those can simply run their local file explorer and access smb shares.

Continue reading “Tablacus Explorer is an awesome replacement for explorer.exe as a #XenApp published Application!”

How we use Classic Shell as a Start Menu replacement in XenApp

Ever since Windows 8 and Windows Server 2012 the Windows Start menu is dead to me. I tried a few times to use it, but horrible placement and the slow search function make it unusable. Many people say that this is no longer valid for Windows 10 and Windows Server 2016, and I agree that it has become a lot better, but i still don’t like it.
Besides my personal feelings, there are so many ridiculous problems with the Windows 10 Start Menu, that I must confess that I never even tried to deploy it enterprise ready. Examples:

Continue reading “How we use Classic Shell as a Start Menu replacement in XenApp”