2011
12.21

With the PowerShell Window, you can run Help or Get-Help to go looking for information of syntax and flags.  If you want, you can even use the get-member cmdlet, such as:

Get-NetAdapter | Get-Member

There’s two things that are happening with the above command.  Get-NetAdapter is being run, and then we’re using a pipe to send the output as an input to Get-Member.  Get-Member will list all of the attributes of the Get-NetAdapter output, including methods and properties.  You might want to filter that down, and you can do that by running:

Get-NetAdapter | Get-Member –MemberType Property

Where did I get –MemberType from?  Look at the titles of the columns from the previous command.  One of them was called MemberType.

I could have just as easily used:

Get-NetAdapter | Get-Member –Name *Interface*

That would have limited the results to attributes of Get-NetAdapter that contained “Interface” in their name.

Technorati Tags: ,

2 comments so far

Add Your Comment
  1. Another great command which came with Powershell v3 is Show-Command. Which helps you adding paramters to you PowerShell cmdlet.

    for example:
    Show-Command Show-Command Get-Childitem

    http://www.thomasmaurer.ch/2011/11/powershell-3-0-show-command/

  2. See the difference in output of the following 2:

    Get-NetAdapter | Get-Member
    compared to
    Get-NetAdapter | Get-Member *
    :)

Get Adobe Flash player