listVMByFolder.pl

Version 4

    Original Author: stumpr syndicated from Re: listing of folders and its respective vms

    Sample execution ( --server can be either ESX(i) or vCenter ):

    [vi-admin@scofield scripts]$ ./listVMByFolder.pl --server reflex.primp-industries.com --username primp

    Enter password:
    Datacenter: Primp
        Folder: Dev-Hypervisors
            Virtual Machine: ESXi3.5
            Virtual Machine: ESXi4
        Folder: Dev
            Virtual Machine: Devastator
            Virtual Machine: Quentin
            Virtual Machine: ThinStation-Dev
            Virtual Machine: Thinapp
            Virtual Machine: WinXPeDev
            Virtual Machine: grimlock
            Virtual Machine: knoppix
            Virtual Machine: master-xp
            Virtual Machine: testpvscsi
        Folder: Discovered virtual machine
            Virtual Machine: horrid
            Virtual Machine: inTheGhetto
        Folder: ESX-Admin
            Virtual Machine: ESX-Kickstart
            Virtual Machine: VIMA
            Virtual Machine: dhcp-test
            Virtual Machine: kate
            Virtual Machine: scofield
            Virtual Machine: vmm
        Folder: LabDev
            Virtual Machine: testRGS
            Virtual Machine: vdiMaster
        Folder: Primp-Servers
            Folder: GH-ProjectDev
                Virtual Machine: jerry
                Virtual Machine: tom
            Virtual Machine: Auroa
        Folder: Templates
        Folder: User VMs
            Virtual Machine: STA202I
            Virtual Machine: William-XP
        Folder: VMwareViewComposerReplicaFolder
    Datacenter: PrimpSkunkworks
        Folder: Discovered Virtual Machine