Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Get-Member

Get-Member - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Get-Member

Description
Enumerate the properties of an object

Usage


Options


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