PowerCLI

 View Only
  • 1.  Select or select-object

    Posted Nov 02, 2009 04:38 PM

    I am trying to find out the difference in using select and select-object command in powershell commands, as I have seen it used in different commands but seem to get the same result, and want to find out when should each command be used.

    Such as the below command:

    Get-vm | select name

    Get-vm | select-object name

    Whats the difference in using each of select command. Any advise on this



  • 2.  RE: Select or select-object

    Posted Nov 02, 2009 04:45 PM

    According to:

    Get-Help Select-Object

    And

    Get-Help Select

    They are the same...

    Regards Simon

    -


    Visit My Blog, The SLOG at:

    Follow me on Twitter:



  • 3.  RE: Select or select-object

    Posted Nov 02, 2009 04:45 PM

    I'm pretty sure that Select is simply an alias for Select-Object and functions exactly the same just as Dir is an alias for Get-ChildItem.

    You can check a list of available aliases by typing Get-Alias

    Josh Atwell



  • 4.  RE: Select or select-object

    Posted Nov 02, 2009 04:47 PM

    I'm pretty sure that Select is simply an alias for Select-Object and functions exactly the same just as Dir is an alias for Get-ChildItem.

    Josh Atwell



  • 5.  RE: Select or select-object

    Posted Nov 02, 2009 04:48 PM

    OK thanks for making that clear