Automation

 View Only
  • 1.  How to list all VMs‘ name

    Posted Mar 16, 2013 09:46 AM

    I want display a list for all VMs' name.

    Get-VM will export to many info,how to filter the info i need?



  • 2.  RE: How to list all VMs‘ name
    Best Answer

    Posted Mar 16, 2013 09:55 AM

    With the Select-Object cmdlet, like this

    Get-VM | Select Name

    The Get-VM produces objects which you pass through the pipeline ('|') to the Select-Object cmdlet.

    The Select-Object cmdlet allows you to select one or more of the properties of the objects it recieves.



  • 3.  RE: How to list all VMs‘ name

    Posted Mar 16, 2013 10:15 AM

    Thanks LucD!

    There're so much knowledge I need to learn from you !



  • 4.  RE: How to list all VMs‘ name

    Posted Mar 16, 2013 10:37 AM

    In My PS Library post you'll find some links to learning resources for PowerShell.

    Josh also did a nice overview of getting started resources, see his Resources for Getting Started with #PowerCLI Automation