As I get, you need to rename vCenter VMs to its original name (hostname) to a string like hostname-VM. so
If you’d like to create a PowerCLI script to handle this, here’s a good starting point:
# And always be careful when running a script in a production environment. (first test it in a lab environment)
You can run this script on a Windows workstation with PowerCLI installed, or you can integrate it into a vRO workflow using PowerShell host integration.
However, if you prefer to continue using the Rename Virtual Machine workflow in vRO, you’ll need to plan carefully. You should also add logic at the beginning of your script (or workflow) to fetch all VMs from vCenter that don’t already have -vm
at the end of their name.
If you want to proceed with this method, I’d be happy to help you continue building it step by step.
Let me know how you’d like to move forward!