vCenter Orchestrator Script – Increment VM Name by 1

Simple little code snippet that you might find handy to use in vCenter Orchestrator.  I am working on a workflow that needs to clone a VM and the name should increment by 1 for example, we want to clone appweb1 (but we already have appweb2, 3, 4) so we want the new VM to be appweb5.

Inside a new Scriptable task create an output parameter called newvmname and make it’s source itself.  Then use this bit ‘o code:

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.