While trying to delete a resource or host connection and Receiver displays the following error:
"resource name" cannot be deleted because they are being used by the following objects and/or background actions: There are x active background actions Please try again later."
1.) In PowerShell do the following:
PS H:\> cd xdhyp:The following is the output. You'll see all of your hosting units. Find the HostingUnitUid that you want to delete and copy.
PSPath : Citrix.Host.Admin.V2\Citrix.Hypervisor::XDHyp:\HostingUnits\JCT01New
PSParentPath : Citrix.Host.Admin.V2\Citrix.Hypervisor::XDHyp:\HostingUnits
PSChildName : JCT01New
PSDrive : XDHyp
PSProvider : Citrix.Host.Admin.V2\Citrix.Hypervisor
PSIsContainer : True
HostingUnitName : JCT01New
HostingUnitUid : aeb15638-1875-3a304-b359-25df52f252a2
HypervisorConnection : VMware
Metadata :
MetadataMap :
NetworkId : Network:network-4801
NetworkPath : XDHyp:\Connections\VMware\Citrix test.datacenter\XenDesktop Cluster.cluster\XD
.network
PermittedNetworks : {XDHyp:\Connections\VMwareNew\Citrix test.datacenter\XenDesktop Cluster.cluster\X
D.network}
RootId : domain-c2435
RootPath : XDHyp:\Connections\VMwareNew\Citrix test.datacenter\XenDesktop Cluster.cluster
Storage : {XDHyp:\Connections\VMwareNew\Citrix test.datacenter\XenDesktop Cluster.cluster\E
SX-CitrixXD2-OC.storage, XDHyp:\Connections\VMwareNew\Citrix test.datacenter\XenD
esktop Cluster.cluster\ESX-CitrixXD.storage}
VMTaggingEnabled : True
UseLocalStorageCaching : False
PersonalvDiskStorage : {XDHyp:\Connections\VMwareNew\Citrix test.datacenter\XenDesktop Cluster.cluster\E
SX-CitrixXDpvd.storage}
PSPath : Citrix.Host.Admin.V2\Citrix.Hypervisor::XDHyp:\HostingUnits\JCT01Old
PSParentPath : Citrix.Host.Admin.V2\Citrix.Hypervisor::XDHyp:\HostingUnits
PSChildName : JCT01Old
PSDrive : XDHyp
PSProvider : Citrix.Host.Admin.V2\Citrix.Hypervisor
PSIsContainer : True
HostingUnitName : JCT01Old
HostingUnitUid : 0b256e23-2554-3fd3-3a134-bd1323d35256
HypervisorConnection : VMwareOld
Metadata :
MetadataMap :
NetworkId : Network:network-4801
NetworkPath : XDHyp:\Connections\VMwareOld\Citrix test.datacenter\XenDesktop Cluster.cluster\XD
.network
PermittedNetworks : {XDHyp:\Connections\VMwareOld\Citrix test.datacenter\XenDesktop Cluster.cluster\X
D.network}
RootId : domain-c4960
RootPath : XDHyp:\Connections\VMwareOld\Citrix test.datacenter\XenDesktop Cluster.cluster
Storage : {}
VMTaggingEnabled : True
UseLocalStorageCaching : False
PersonalvDiskStorage : {}
You should see the same count that the error was displaying.
Count : 0 ObjectId : 0b256e23-2554-3fd3-3a134-bd1323d35256 Source : ProvisioningScheme Target : HostingUnit Count : 48 ObjectId : 0b256e23-2554-3fd3-3a134-bd1323d35256 Source : Task Target : HostingUnit
Base disks may have been deleted in the hypervisor manually and not through Studio or machines pending a reboot could have been removed prior to being rebooted.