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

Capture19

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

Capture20

asnp Citrix*

cd XDHyp:

cd HostingUnits

LS

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

Capture21

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\VNX-Templates.storage’

Capture22

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

Capture23

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.  http://support.citrix.com/article/CTX131207

 

One response to “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 comment

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