Remove Existing Storage under Hosting node in Citrix Studio – PowerShell way

On the Desktop Studio, there is a menu for adding additional storage but no option for removing the storage once it is configured.

However, there is a PowerShell cmdlet Remove-HypHostingUnitStorage that can be used for removing the existing Storage

The below is how my datastore connections look like and I am going to demo removing one of the existing connections VNX-Templates


Open PowerShell in Admin mode and run the below commands one after the other


asnp Citrix*

cd XDHyp:

cd HostingUnits


Look for the below marked text in the output for ls command


Run the below to delete the datastore

Remove-HypHostingUnitStorage -LiteralPath ‘XDHyp:\HostingUnits\DataStore – Hosted Shared Desktops’ -StoragePath ‘XDHyp:\Connections\MCSforXD\Mt Albert.datacenter\Production.cluster\’


Wait for the command to complete. once done, refresh the Studio and you will notice that the datastore has been removed.


Citrix themselves also has got a KB  out for doing the same and there are some pretty disclaimers and warning before you attempt to do this.


One thought on “Remove Existing Storage under Hosting node in Citrix Studio – PowerShell way

  1. I know this is an old article, but I after following the commands, my hosts are all gone completely. On the page it now says value cannot be null. Parameter name: source.

    I can’t manually re-add the host either. Any ideas?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.