PSScriptMethod PSScriptMethod PSScriptMethod Class

Definition

Serves as a method implemented with a script

public class PSScriptMethod : System.Management.Automation.PSMethodInfo
type PSScriptMethod = class
    inherit PSMethodInfo
Public Class PSScriptMethod
Inherits PSMethodInfo
Inheritance

Remarks

It is permitted to subclass PSScriptMethod but there is no established scenario for doing this, nor has it been tested.

Constructors

PSScriptMethod(String, ScriptBlock) PSScriptMethod(String, ScriptBlock) PSScriptMethod(String, ScriptBlock)

Initializes a new instance of PSScriptMethod

Properties

IsInstance IsInstance IsInstance Inherited from PSMemberInfo
MemberType MemberType MemberType

Gets the member type

Name Name Name Inherited from PSMemberInfo
OverloadDefinitions OverloadDefinitions OverloadDefinitions

Gets a list of all the overloads for this method

Script Script Script

Gets the script implementing this PSScriptMethod

TypeNameOfValue TypeNameOfValue TypeNameOfValue

Gets the type of the value for this member. Currently this always returns typeof(object).FullName.

Value Value Value Inherited from PSMethodInfo

Methods

Copy() Copy() Copy()

returns a new PSMemberInfo that is a copy of this PSMemberInfo

Invoke(Object[]) Invoke(Object[]) Invoke(Object[])

Invokes Script method and returns its results.

SetMemberName(String) SetMemberName(String) SetMemberName(String) Inherited from PSMemberInfo
ToString() ToString() ToString()

Returns the string representation of this member

Applies to