PSScriptMethod Members
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.
The following tables list the members exposed by the PSScriptMethod type.
| Name | Description | |
|---|---|---|
| PSScriptMethod | Initializes a new instance of the PSScriptMethod class that contains the name of the method and the script that is run when the method is called. |
| Name | Description | |
|---|---|---|
|
IsInstance | Gets a value that indicates whether the source of the member is a type configuration file. (Inherited from PSMemberInfo) |
|
MemberType | Overridden. Gets an identifier that indicates that this method is a script method. |
|
Name | Gets the name of the extended member (method, property, or member set). (Inherited from PSMemberInfo) |
|
OverloadDefinitions | Overridden. Gets the definitions of all of the overloads of the underlying script method. |
|
Script | Gets the script that is run when the method is called. |
|
TypeNameOfValue | Overridden. Gets the extended type system (ETS) type of this method. |
|
Value | Overridden. Gets and sets the value of this method. (Inherited from PSMemberInfo) |
(see also
Protected Methods
)
Top
| Name | Description | |
|---|---|---|
![]() | Copy | Overridden. Creates a copy of the current PSScriptMethod object. |
![]() | Equals | (Inherited from Object) |
![]() | GetHashCode | (Inherited from Object) |
![]() | GetType | (Inherited from Object) |
![]() | Invoke | Overridden. Invokes the script of the method and retrieves its results. |
![]() | ToString | Overridden. Converts the PSScriptMethod object to a string. |
| Name | Description | |
|---|---|---|
|
Finalize | (Inherited from Object) |
|
MemberwiseClone | (Inherited from Object) |
|
SetMemberName | Sets the name of the extended member. This method is introduced in Windows PowerShell 2.0. (Inherited from PSMemberInfo) |
Reference
PSScriptMethod ClassSystem.Management.Automation Namespace
Other Resources
Windows PowerShell SDKSend comments about this topic to Microsoft.