Gets the properties and methods of objects.
-Force
Adds the intrinsic members (PSBase, PSAdapted, PSObject, PSTypeNames) and the compiler-generated get_ and set_ methods to the display. By default, Get-Member gets these properties in all views other than "Base" and "Adapted," but it does not display them.
The following list describes the properties that are added when you use the Force parameter:
-- PSBase: The original properties of the .NET Framework object without extension or adaptation. These are the properties defined for the object class and listed in MSDN.
-- PSAdapted: The properties and methods defined in the Windows PowerShell extended type system.
-- PSExtended: The properties and methods that were added in the Types.ps1xml files or by using the Add-Member cmdlet.
-- PSObject: The adapter that converts the base object to a Windows PowerShell PSObject object.
-- PSTypeNames: A list of object types that describe the object, in order of specificity. When formatting the object, Windows PowerShell searches for the types in the Format.ps1xml files in the Windows PowerShell installation directory ($pshome). It uses the formatting definition for the first type that it finds.
|
Required?
|
false
|
|
Position?
|
named
|
|
Default Value
|
|
|
Accept Pipeline Input?
|
false
|
|
Accept Wildcard Characters?
|
false
|
-InputObject <psobject>
Specifies the object whose members are retrieved.
Using the InputObject parameter is not the same as piping an object to Get-Member. The differences are as follows:
-- When you pipe a collection of objects to Get-Member, Get-Member gets the members of the individual objects in the collection, such as the properties of each string in an array of strings.
-- When you use InputObject to submit a collection of objects, Get-Member gets the members of the collection, such as the properties of the array in an array of strings.
|
Required?
|
false
|
|
Position?
|
named
|
|
Default Value
|
|
|
Accept Pipeline Input?
|
true (ByValue)
|
|
Accept Wildcard Characters?
|
false
|
-MemberType <PSMemberTypes>
Gets only members with the specified member type. The default is All.
The valid values for this parameter are:
-- AliasProperty: A property that defines a new name for an existing property.
-- CodeMethod: A method that references a static method of a .NET Framework class.
-- CodeProperty: A property that references a static property of a .NET Framework class.
-- Event: Indicates that the object sends a message to indicate an action or a change in state.
-- MemberSet: A predefined collection of properties and methods, such as PSBase, PSObject, and PSTypeNames.
-- Method: A method of the underlying .NET Framework object.
-- NoteProperty: A property with a static value.
-- ParameterizedProperty: A property that takes parameters and parameter values.
-- Property: A property of the underlying .NET Framework object.
-- PropertySet: A predefined collection of object properties.
-- ScriptMethod: A method whose value is the output of a script.
-- ScriptProperty: A property whose value is the output of a script.
-- All: Gets all member types.
-- Methods: Gets all types of methods of the object (for example, Method, CodeMethod, ScriptMethod).
-- Properties: Gets all types of properties of the object (for example, Property, CodeProperty, AliasProperty, ScriptProperty).
Not all objects have every type of member. If you specify a member type that the object does not have, Windows PowerShell returns a null value.
To get related types of members, such as all extended members, use the View parameter. If you use the MemberType parameter with the Static or View parameters, Get-Member gets the members that belong to both sets.
|
Required?
|
false
|
|
Position?
|
named
|
|
Default Value
|
|
|
Accept Pipeline Input?
|
false
|
|
Accept Wildcard Characters?
|
false
|
-Name <string[]>
Specifies the names of one or more properties or methods of the object. Get-Member gets only the specified properties and methods.
If you use the Name parameter with the MemberType, View, or Static parameters, Get-Member gets only the members that satisfy the criteria of all parameters.
To get a static member by name, use the Static parameter with the Name parameter.
|
Required?
|
false
|
|
Position?
|
1
|
|
Default Value
|
|
|
Accept Pipeline Input?
|
false
|
|
Accept Wildcard Characters?
|
false
|
-Static
Gets only the static properties and methods of the object.
Static properties and methods are defined on the class of objects, not on any particular instance of the class.
If you use the Static parameter with the View parameter, the View parameter is ignored. If you use the Static parameter with the MemberType parameter, Get-Member gets only the members that belong to both sets.
|
Required?
|
false
|
|
Position?
|
named
|
|
Default Value
|
|
|
Accept Pipeline Input?
|
false
|
|
Accept Wildcard Characters?
|
false
|
-View <PSMemberViewTypes>
Gets only particular types of members (properties and methods). Specify one or more of the values. The default is "Adapted, Extended".
Valid values are:
-- Base: Gets only the original properties and methods of the .NET Framework object (without extension or adaptation).
-- Adapted: Gets only the properties and methods defined in the Windows PowerShell extended type system.
-- Extended: Gets only the properties and methods that were added in the Types.ps1xml files or by using the Add-Member cmdlet.
-- All: Gets the members in the Base, Adapted, and Extended views.
The View parameter determines the members retrieved, not just the display of those members.
To get particular member types, such as script properties, use the MemberType parameter. If you use the MemberType and View parameters in the same command, Get-Member gets the members that belong to both sets. If you use the Static and View parameters in the same command, the View parameter is ignored.
|
Required?
|
false
|
|
Position?
|
named
|
|
Default Value
|
|
|
Accept Pipeline Input?
|
false
|
|
Accept Wildcard Characters?
|
false
|
<CommonParameters>
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, -OutVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.