As per part1, The view pool created using script which eases our operation. View admin would like to automate the view pool operations using powercli.
- To reduce no of desktops
- Disable provisoin and pools
- Enable provision and pools
- Update LC pool datastore
- Update Snapshot for LC pool
- To do Recompose with new snapshot
- To reduce no of desktops:
update-AutomaticLinkedClonePool -Pool_id “Pool1” -MinimumCount 1 -MaximumCount 1 -headroomCount 1
update-AutomaticLinkedClonePool -Pool_id “Pool2” -MinimumCount 1 -MaximumCount 1 -headroomCount 1
As per standard:
update-AutomaticLinkedClonePool -Pool_id “Pool1” -MinimumCount 2 -MaximumCount 5 -headroomCount 2
update-AutomaticLinkedClonePool -Pool_id “Pool2” -MinimumCount 2 -MaximumCount 5 -headroomCount 2
2. Disable provisoin and pools
update-AutomaticLinkedClonePool -Pool_id “Pool1” -Disabled 1 -IsProvisioningEnabled 0
update-AutomaticLinkedClonePool -Pool_id “Pool2” -Disabled 1 -IsProvisioningEnabled 0
3. Enable provision and pools
update-AutomaticLinkedClonePool -Pool_id “Pool1” -Disabled 0 -IsProvisioningEnabled 1
update-AutomaticLinkedClonePool -Pool_id “Pool2” -Disabled 0 -IsProvisioningEnabled 1
4. Update LC pool datastore
update-AutomaticLinkedClonePool -Pool_id “Pool1” -DatastoreSpecs aaa/host/Datastorename
update-AutomaticLinkedClonePool -Pool_id “Pool2” -aaa/host/Datastorename
5. Update Snapshot for LC pool
Update-AutomaticLinkedClonePool -pool_id “Pool1” -parentVMPath /vc/vm/BASE/vm -parentSnapshotPath /3360339A1 -ErrorAction “stop”
6. To do Recompose with new snapshot:
Update-AutomaticLinkedClonePool -pool_id “pool1” -parentVMPath /location of vm -parentSnapshotPath /602G9A1 -ErrorAction “stop”
Get-Desktopvm -pool_id pool1 | Send-LinkedCloneRecompose -parentVMPath /vm/BASE/vm1 -parentSnapshotPath /vm1 -schedule ((get-date).addminutes(2)) -forceLogoff:$true -stopOnError:$true -ErrorAction “stop”