PowerShell: Get More Information On Your CmdLets

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 thoughts on “PowerShell: Get More Information On Your CmdLets”

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

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

    🙂

Leave a Reply to MBSNL Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.