This script performs a Controlled Recompose of a VMware View Linked Clone Pool of Virtual Desktops. It first identifies a free desktop and recomposes it to create the first Replica Desktop. Note: If this first recompostion fails the script aborts assuming the creation of the Replica VM also failed.
After the recomposition of the first desktop, the script recomposes a specified number of additional free desktops to create a supply of recomposed systems. These desktops will be available for re-connecting users when the script next recomposes the remaining desktops in the pool, directing View to force logoff active users after the warning period specified in View Manager. An optional extra recompose can be run against the pool as the final step to provide a second attempt to recompose any desktops that may have failed.
During operation the script will abort after a specified number of timed out recompositions in a row (default 3). It will also immediately abort if it detects a View Composer error. The script can be configured to send Email Alerts to notify Administrators of both failed and successful script operations. The script runs by default in interactive mode, prompting for required settings. It can also be run in unattended mode to support scheduled, automated maintenance.