- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Again,
Haven't got the syntax correct yet, but am thinking along the lines of the below:
Export $desktopsavailable into Array (Sort descending deleting highest desktop name/number first) (check if >1)
$ProvisioningDifference = OverProvisionedDesktops-MinDesktops (check if >1, could be =0, no over provisioning - in that case move on...)
Find out which is lower - AvailableDesktops.count and ProvisioningDifference = $Max2Delete
For [x] = 1 to $Max2Delete Do
delete-vm $desktopsavailable [x]
Next
Move onto next Pool, - type = FLOATING