Automation

 View Only
  • 1.  VMs by Folder

    Posted Jun 09, 2009 08:45 PM

    I've been trying to get a powershell script to traverse the folder view of VC and output a list of VMs that includes the folder it is in. The problem I have is getting complete folder location of the VM like \parent\child1\child2 rather than just the specific folder the VM is in. I'm assuming the way to go is a loop through folders and then getting the VM collection for each but cant quite get the hierarchy to appear in the ouput.

    So, if the folder structure in VC was

    finance

    invoicing

    VM1

    VM2

    purchasing

    VM3

    then the output would look something like

    VM1 \finance\invoicing

    VM2 \finance\invoicing

    VM3 \finance\purchasing

    A point in the right direction would be appreciated



  • 2.  RE: VMs by Folder
    Best Answer

    Posted Jun 09, 2009 08:56 PM

    Have a look at