dear all
today I am cloning VMs with my vCenter (Scheduled tasks) and I delete my clones with Powershell PowerCLI.
But if f.e. my datastore is full, the clone job wont be successful, in this case I want to get an alert.
How could I verify if my clone job was sucessfull?
Thank you in advance
You can try:
(Get-Task | Where-Object { $_.Name -eq "CloneVM_Task"}).State
The Get-Task cmdlet retrieves information about the current or recent tasks.
The state value returned is Error, Queued, Running, or Success.
Robert
You can try:
(Get-Task | Where-Object { $_.Name -eq "CloneVM_Task"}).State
The Get-Task cmdlet retrieves information about the current or recent tasks.
The state value returned is Error, Queued, Running, or Success.
Robert