You are here:

WindowsManagement.com > PowerShell > PowerShell 1.0 > Get-Member
ActiveXperts Network Monitor 2015 proactively manages network servers, devices, databases and more.

Get-Member - PowerShell 1.0

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Get-Member


Description
Back up your Hyper-V VMs Easy & Fast. 100% built for Hyper-V. Free for 2 VMs, forever.

Usage


Options
-name 
        The member name(s) to retrieve information about.

   -inputObject 
        The objects to retrieve information about.
		
   -memberType 
        The type of members to retrieve information about. 
        Valid member types are: AliasProperty, CodeProperty,
        Property, NoteProperty, ScriptProperty, Properties,
        PropertySet, Method, CodeMethod, ScriptMethod, Methods,
        ParameterizedProperty, MemberSet, and All.

   -static 
        Retrieve static properties and methods.
		
CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

Example(s)
Display the properties of a Process object: (.Net Framework Class Library System.Diagnostics.Process)

PS C:\>get-process | get-member -MemberType property

Display the properties of an Alias object:

PS C:\>get-alias | get-member

or using a variable:
PS C:\>$alias = get-alias
$alias | get-member

Display the properties of the container object, a System.Object array:

PS C:\>$alias = get-alias
get-member -inputobject $alias

Piping a command into get-member twice will display the properties of the parent object: Powershell.Commands.MemberDefinition:

PS C:\>get-process | get-member | get-member

Pipelining a container object, will run get-member for each element in the container.
Using the -InputObject parameter, will run get-member for the container object itself.
Prefixing the pipelined input with a comma will also force get-member to run against the container object:
PS C:\>,$alias | get-member