Updated: April 27, 2016
Applies To: Windows PowerShell
Represents a method that runs a script when it is called. These methods are referred to as script methods and are used to extend objects.
Assembly: System.Management.Automation (in System.Management.Automation.dll)
Initializes a new instance of theclass that contains the name of the method and the script that is run when the method is called.
Gets a value that indicates whether the source of the member is a type configuration file.(Inherited from PSMemberInfo.)
Gets an identifier that indicates that this method is a script method.(Overrides PSMemberInfo.MemberType.)
Gets the name of the extended member (method, property, or member set).(Inherited from PSMemberInfo.)
Gets the definitions of all of the overloads of the underlying script method.(Overrides PSMethodInfo.OverloadDefinitions.)
Gets the script that is run when the method is called.
Gets the extended type system (ETS) type of this method.(Overrides PSMemberInfo.TypeNameOfValue.)
Gets and sets the value of this method.(Inherited from PSMethodInfo.)
Creates a copy of the current PSMemberInfo.Copy().)object.(Overrides
Invokes the script of the method and retrieves its results.(Overrides PSMethodInfo.Invoke(Object).)
Sets the name of the extended member. This method is introduced in Windows PowerShell 2.0.(Inherited from PSMemberInfo.)
Converts the Object.ToString().)object to a string.(Overrides
For more information about script methods and other method types that can be used to extend objects, see ETS Methods [ps].
Although it is possible to derive from this class, there is no established scenario for doing this and any attempt to do so may result in unexpected behavior.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.