VMware Horizon Community
maorzohar
Contributor
Contributor

Cancel a Recompose task for a VM through PowerCLI

Hi,

I wondered if there is an option to cancel a Recompose task from PowerCLI.

I have a Powershell script that do some things, and I want to do a check in my script - If there is a Recompose task for a specific VM, cancel it and then do some operations.

Is it possible or only from the Admin console?

Thanks.

0 Kudos
1 Reply
Shreyskar
VMware Employee
VMware Employee

You can use powercli to perform view composer task as below:

Get-Pool -Pool_id TestLC1 | Get-DesktopVM | Send-LinkedCloneRecompose -ParentVMPath /Horizon/vm/Master/Win10gold -ParentSnapshotPath /0222/0225 -schedule '2020-07-28 18:00'

You can refer below docs:

https://static.packt-cdn.com/downloads/7966EN_Chapter14_Managing_View_with_PowerCLI.pdf

https://docs.vmware.com/en/VMware-Horizon-7/7.0/view-70-integration.pdf

View PowerCLI cmdlet Parameters

View API - VMware API Explorer - VMware {code} 

0 Kudos