Hi, I am building PowerShell GUI tool for server decommission. Removal of VM entirely from vSphere is the last step in the code but due to company policy server can not be removed immediately - it must stay in the vSphere for 5 days or so. Is there any way of coding VM removal in 5 days time as vSphere scheduled task using PowerCLI?
Thank you in advance.
You can create a Scheduled Task for that
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
I am talking about vSphere scheduled task, not Windows. Is former even doable?
I'm also talking about a vSphere Scheduled Task, more specifically with a MethodAction.
I did a blog post on the subject, see Scheduled Tasks – MethodAction
In this particular case, you would be using the Destroy method on the VM
.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference