vCO: Find VM name based on UUID

My colleague asked me can I find out the VM name based on its UUID. I helped him by running a PowerCLI command: Get-VM | Foreach ($_) {If ((Get-View $ -eq “422041b7-8ccd-xxxx-xxxx-2770502e404a“) {Write-host $}}

I was thinking why not build up a vCO workflow so they can help themselves in the future in case they don’t have the PowerCLI installed. Now I turned that good thought into reality Smile



All work done in the script task named ‘Searching UUID or Name’.  It allow user to find the name based on UUID, or find the UUID based on the name.

var vms = VcPlugin.getAllVirtualMachines();
vmname = vmname.trim();
vmuuid = vmuuid.trim();

for (i in vms){
    var vm = vms[i];
        System.log( + ” UUID is ” + vm.config.uuid);
        System.log(vm.config.uuid + ” is the UUID of ” +;


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s