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: ,

Please follow and like us:

2 Comments on PowerShell: Get More Information On Your CmdLets

  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


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

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


Leave a comment

Your email address will not be published.