How to reset or redeploy a XenDesktop environment without having to re-install the Desktop Delivery Controllers (DDC).
Note: To reset XenDesktop, Citrix recommends to uninstall all the Desktop Delivery Controller (DDC) machines before removing the database. When any setup issues occur, uninstalling can be a time consuming process. So, this article describes how to clean up the environment without reinstalling the system.
You must be able to run PowerShell as a XenDesktop Full Administrator (the same administrator was previously used to deploy XenDesktop), or if XenDesktop has not been set up, you must be a Domain Administrator.
To clean the environment and remove the database, complete the following steps:
Load a PowerShell window as a Full Administrator..
Run the following command to initialize the PowerShell environment:
Add-PSSnapin Citrix.*
Nullify the connection strings from the registry via PowerShell so that the controller does not connect to the database:
Set-AcctDBConnection -DBConnection $null
Set-AnalyticsDBConnection -DBConnection $null
Set-AppLibDBConnection -DBConnection $null
Set-BrokerDBConnection -DBConnection $null
Set-EnvTestDBConnection -DBConnection $null
Set-HypDBConnection -DBConnection $null
Set-MonitorDBConnection -DataStore Monitor -DBConnection $null
Set-MonitorDBConnection -DBConnection $null
Set-OrchDBConnection -DBConnection $null
Set-ProvDBConnection -DBConnection $null
Set-SfDBConnection -DBConnection $null
Set-TrustDBConnection -DBConnection $null
Set-LogDBConnection -DataStore Logging -DBConnection $null -Force
Set-LogDBConnection -DBConnection $null -Force
Set-ConfigDBConnection -DBConnection $null -Force
Set-AdminDBConnection -DBConnection $null -Force
Note: Ensure that these commands run on every DDC that was previously set up to use the same database or deployment.
You must now have no connections on the database.
Access the database server and remove the database (optional step).
After removing the database, access the first (or only) XenDesktop Controller and restart Desktop Studio.
After Desktop Studio is restarted, it will load with the initial setup options as if you have just installed XenDesktop.