Automation

 View Only
  • 1.  No of VMs in in VC withNames

    Posted Nov 22, 2011 02:09 PM

    Hi,

    I wanted to findout the no of VMs in entire VC with their names in CSV format.

    thanks

    vmguru



  • 2.  RE: No of VMs in in VC withNames
    Best Answer

    Posted Nov 22, 2011 02:11 PM

    This should work

    Get-VM | Select Name | Export-Csv "C:\report.csv" -NoTypeInformation -UseCulture

    To get the number you can do

    (Get-VM | Measure-Object).Count


  • 3.  RE: No of VMs in in VC withNames

    Posted Nov 22, 2011 02:26 PM

    Thaks LucD

    You are awasome. perfect time i got response

    thanks

    vmguy



  • 4.  RE: No of VMs in in VC withNames

    Posted Nov 22, 2011 07:56 PM

    For quick & trivial queries like these, I prefer to just use RVTools.  http://www.robware.net.

    It's a GREAT tool for exporting a LOT of information into CSV files quickly.