PowerShell Genie

Get-Member

Use Get-Member to list an object's properties and methods — the fastest way to discover what pipeline output can do.

Command 2 min read Windows PowerShell 5.1 and PowerShell 7

Documentation: Microsoft Learn — Get-Member

Syntax

1PS> Get-Member [[-Name] <string[]>] [-InputObject <PSObject>] [-MemberType <PSMemberTypes>] [-View <PSMemberViewTypes>] [-Static] [<CommonParameters>]
See the command anatomy

Inspect this authored example with fictional data in the bounded browser model. The numbered stages show how its objects change.

Get-Process | Get-Member
  1. Stage 1Get-ProcessPositional values or no named parameters
  2. Stage 2Get-MemberPositional values or no named parameters

    Try it

    Windows PowerShell

    PowerShell example · browser support is limited.

    Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.

    Interactive simulation · fictional data

    Examples

    List all with Get-Process

    1PS> Get-Process | Get-Member
    Show reference output

    Illustrative output · values vary by environment

    Name          MemberType
    ------------  ----------
    CPU           Property  
    Id            Property  
    Name          Property  
    ProcessName   Property  
    WorkingSet    Property  
    WorkingSet64  Property  
    WS            Property  

    Get-Service -MemberType Property

    1PS> Get-Service | Get-Member -MemberType Property
    Show reference output

    Illustrative output · values vary by environment

    TypeName: System.ServiceProcess.ServiceController
    
    Name        MemberType  Definition
    ----        ----------  ----------
    Equals      Method      bool Equals(System.Object obj)
    ToString    Method      string ToString()
    Name        Property    string Name {get;}
    Status      Property    object Status {get;}

    Get-Date -Static

    1PS> Get-Date | Get-Member -Static
    Show reference output

    Illustrative output · values vary by environment

    TypeName: System.DateTime
    
    Name        MemberType  Definition
    ----        ----------  ----------
    Equals      Method      bool Equals(System.Object obj)
    ToString    Method      string ToString()
    Name        Property    string Name {get;}
    Status      Property    object Status {get;}

    Parameters

    Parameter definitions:

    • -Name
    • -InputObject
    • -MemberType
    • -View
    • -Static

    Get-Member on Microsoft Learn

    Practical use and troubleshooting

    Practical scenario: Use Get-Member when you need to list an object's properties and methods — the fastest way to discover what pipeline output can do. Start with one identified target and inspect the returned values before extending the operation to a list. Keep the identity in your report so you can trace each result back to the object or path that produced it.

    Common error and fix: Inspecting a wrapper array instead of its elements gives unexpected members. Pipe representative objects to Get-Member and confirm the input type before selecting a property. In an unattended script, capture this failure with its original error record and record which target failed. An empty result and an unsuccessful query must remain distinguishable in the final report.

    See also: Get-Command. Get-Member inspects an object's members; Get-Command discovers commands. Command syntax and an output object's properties answer different questions when building a pipeline. Read the linked command before substituting it; similar names do not imply identical inputs or output.

    Get-Member reference on Microsoft Learn

    Put this command to work

    Discover service properties

    Use Get-Member to list the available service properties.

    Review the lesson

    Recap

    Get-Member Use Get-Member to list an object's properties and methods — the fastest way to discover what pipeline output can do.

    Next: Get-Alias
    Genie guideGet-Member

    Use Get-Member to list an object's properties and methods — the fastest way to discover what pipeline output can do. The console below is pre-loaded — run it, then change a value and run it again.