en-us/about_GetAllMethods.help.txt

TOPIC
    about_GetAllMethods
 
SHORT DESCRIPTION
    The GetAllMethods PowerShell module retrieves information about methods and their parameters, even private ones.
 
LONG DESCRIPTION
    The GetAllMethods PowerShell module provides commands that retrieve object methods and their parameters with Get-Method and Get-MethodParameter. Get-Method can even get private methods using BindingFlags that commands such as Get-Member do not.
 
    The Invoke-Method command can be used to invoke methods that are retrieved.
 
EXAMPLES
    PS C:\> [String] | Get-Method -NonPublic -Static
  
     
        ReflectedType: System.String
 
    Name Definition
    ---- ----------
    CompareOrdinalHelper private static int CompareOrdinalHelper(string strA, string strB)
    CompareOrdinalIgnoreCaseHelper private static int CompareOrdinalIgnoreCaseHelper(string strA, string strB)
    ConcatArray private static string ConcatArray(string[] values, int totalLength)
    .
    .
    .
 
    This command gets all private static methods of the System.String type
 
 
 
    PS C:\> [String] | Get-Method -NonPublic -Static -Name CreateString | Get-MethodParameter
  
     
        Member: System.String CreateString(SByte*, Int32, Int32, System.Text.Encoding)
 
    Position Name ParameterType
    -------- ---- -------------
    0 value System.SByte*
    1 startIndex System.Int32
    2 length System.Int32
    3 enc System.Text.Encoding
  
    This command retrieves the parameters for the private static CreateString method of the System.String type
 
 
 
    PS C:\> [String] | Get-Method -Name SmallCharToUpper -NonPublic -Static | Invoke-Method -ArgumentList "test"
    TEST
 
    This command invokes the private static SmallCharToUpper method of the System.String type on the supplied argument of "test".
 
KEYWORDS
    Methods Parameters PrivateMethods
 
SEE ALSO
    Get-Help Get-Method
    Get-Help Get-MethodParameter
    Get-Help Inovke-Method