• Narrow screen resolution
  • Wide screen resolution
  • Increase font size
  • Decrease font size
  • Default font size
  • default color
  • red color
© Diana Scherff, Amas-Veritas.com

Welcome to Amas Veritas [dot] com

Updates: Media (lyrics) has a new layout. I could never figure out how to lay it out, but it's easier to navigate now. I'm still working on a better duplicate Mamblog mod. I'm trying to make submittions easier but the poetry form died for some reason. Quizzes are also on their way from the old site. Joomla content isn't very code friendly so I'm having to rewrite old code. You can still click on News > AH v21 > Screen if you wish to use the quizzes.
 
Home arrow Tools arrow Windows PowerShell arrow Get-Member [gm]
Get-Member [gm] Print E-mail
Written by Diana, on 04-09-2007 02:15
Views 96    
Favoured None

PS C:\Users\Admin> help gm -full

NAME
    Get-Member

SYNOPSIS
    Gets information about objects or collections of objects.

SYNTAX
    Get-Member [[-name] <string[]>] [-inputObject <psobject>] [-memberType {<AliasProperty> | <CodeProperty> | <Property> | <NoteProperty> | <ScriptProperty> | <Properties> | <PropertySet> | <Method> | <CodeMethod> | <ScriptMethod> | <Methods> | <ParameterizedProperty> | <MemberSet> | <All>}]
    [-static] [<CommonParameters>]


DETAILED DESCRIPTION
    Gets information about the members of objects. Get-Member can accept input from the pipeline or as the value of the InputObject parameter. You can use the MemberType parameter to specify the type of members you want information about.

    If you pipeline input to Get-Member, it outputs a MemberDefinition object for each distinct type of input object.  For example, if you pipe the output of Get-ChildItem to Get-Member in a directory that includes at least one subdirectory and one file, it returns two MemberDefinition objects. One includes information about the FileInfo object and the other includes information about the DirectoryInfo object. Get-Member outputs only two MemberDefinition objects, regardless of how many files or subdirectories are in the directory.

    The output of Get-Member is different if you supply input by using the InputObject parameter. In that case, Get-Member returns a single MemberDefinition object that represents either the single input object or the collection class that contains the set of input objects.

    To retrieve information about static members, you must specify the Static parameter.


PARAMETERS
    -name <string[]>
        Specifies the member names to retrieve information about.

        Required?                    false
        Position?                    1
        Default value                *
        Accept pipeline input?       false
        Accept wildcard characters?  true

    -inputObject <psobject>
        Specifies the objects to retrieve information about. Using this parameter to provide input to Get-Member results in different output than pipelining the same input. When you pipeline input to Get-Member, if the input is a container, the cmdlet returns inĂormation about each unique type of element in the container. If you provide the same input by using the InputObject parameter, the cmdlet returns information about the container object itself. If you want to use pipelining to retrieve information about a container, you must proceed the pipelined input by a comma (,). For example, if you information about processes stored in a variable named $process, you would type ,$process | get-member to retrieve information about the container.

        Required?                    false
        Position?                    named
        Default value
        Accept pipeline input?       true (ByValue)
        Accept wildcard characters?  false

    -memberType <PSMemberTypes>
        Indicates 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.
        The following lists the acceptable values for this parameter:

        AliasProperty

        CodeProperty

        Property

        NoteProperty

        ScriptProperty

        Properties

        PropertySet

        Method

        CodeMethod

        ScriptMethod

        Methods

        ParameterizedProperty

        MemberSet

        All

        Required?                    false
        Position?                    named
        Default value                All
        Accept pipeline input?       false
        Accept wildcard characters?  true

    -static <SwitchParameter>
        Specifies that static properties and methods should be retrieved.

        Required?                    false
        Position?                    named
        Default value                False
        Accept pipeline input?       false
        Accept wildcard characters?  false

    <CommonParameters>
        This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".


INPUT TYPE
    Any object


RETURN TYPE



NOTES


        For more information, type "Get-Help Get-Member -detailed". For technical information, type "Get-Help Get-Member -full". When specifying multiple values for a parameter, use commas to separate the values. For example, "<parameter-name> <value1>, <value2>".


    ----------------- EXAMPLE 1 -----------------

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


    This command displays the properties of a .Net Framework Class Library System.Diagnostics.Process object (the type of objects returned by the get-process Cmdlet).





    ----------------- EXAMPLE 2 -----------------

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


    This command displays information about the AliasInfo object that is returned by the Get-Alias cmdlet. It stores the alias information in the $alias variable. The $alias variable is piped to the Get-Member cmdlet to display information about the members of the AliasInfo objects.  It then uses the InputObject parameter, supplying the $alias parameter as the value,  to demonstrate that when that method of input is used, information about the container object, a System.Object array, is returned.





    ----------------- EXAMPLE 3 -----------------

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


    This command displays information about the MemberDefinition object returned by Get-Member. The Get-Process cmdlet is used to retrieve a list of processes, which provides input to the first call to Get-Member. The result of that call, a MemberDefinition object, is piped to Get-Member. The result is that information about the members of the MemberDefinition object is displayed.






RELATED LINKS
    Add-Member
    Get-Help
    Get-Command
    Get-PSDrive


Last update: 04-09-2007 02:15

Published in : Tools, Windows PowerShell

Users' Comments (0) RSS feed comment

No comment posted

Add your comment



mXcomment 1.0.4 © 2007-2008 - visualclinic.fr
License Creative Commons - Some rights reserved
 
< Prev   Next >




Double click any word on this page for a definition.
Using Firefox? Enable definitions by downloading the extension.
Sorry, this feature does not currently work in Opera or Safari.

No Users Online

Statistics

OS: FreeBSD
PHP: 5.2.1
MySQL: 4.1.21-log
Time: 05:20
Caching: Disabled
GZIP: Disabled
Members: 35
News: 2446
Web Links: 39
Visitors: 1235365

Syndicate

Login

Particls