Go to index

Get-Member

Reference

Listing/Finding the members of an object using Get-Member

Get all the members of an output object of Get-StartApps

To get all the members of a cmdlet output object, simply pipe the command to Get-Memeber

Get-StartApps | Get-Member

Get all the members and the intrinsic members

To get all the intrinsic members and compiler-generated members of an object (by default they are hidden).

$FirewallRules = Get-NetFirewallRule -Name FPS-*
$FirewallRules | Get-Member -Force
$FirewallRules.psbase

Get all the extended members of an InputObject

To get the extended members, like the members are added programmatically or using type xml file.

$VMProcessors = Get-VMProcessor -VMName Lab-ClientX
Get-Member -InputObject $VMProcessors -View Extended

Get all the details of a member by name

Get members by it’s name

Get-NetTCPConnection | Get-Member -Name State | Format-List *

Get the members by type

To get the members by it’s type, like properties or methods

Get-NetAdapter | Get-Member -MemberType Properties # All types of properties
Get-NetAdapter | Get-Member -MemberType ScriptProperty # ScriptProperties Only
Get-NetAdapter | Get-Member -MemberType Methods # All methods
Get-NetAdapter | Get-Member -MemberType Method # Only method type


Go to index
Last modified: 2 October 2020