This post has already been read 13187 times!
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.
All features supported by the scripts are controlled by script parameters. See Instructions for information about the parameters.
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.
Note: If this first recompostion fails the script aborts assuming the creation of the Replica VM also failed.
RecomposeScript.ps1 -pool HRPool-01 -newsnapshot /firstsnap/decemberupdates -parentvm /datacenter/vm/VirtualDesktops/Win7Desk1 -RecomposeTimeout 1500 unattend
RecomposeScript.ps1 -RecomposeAtATime 8 -Desktops2Prep 40 -pool HRPool-01 -newsnapshot /firstsnap/decemberupdates -parentvm /datacenter/vm/VirtualDesktops/Win7Desk1 extrarecomp
RecomposeScript.ps1 -emailfrom firstname.lastname@example.org -emailto email@example.com,firstname.lastname@example.org -usessl 1 -smtpport 587