次の方法で共有


PSScriptMethod(String, ScriptBlock) Constructor

Definition

Initializes a new instance of PSScriptMethod.

public:
 PSScriptMethod(System::String ^ name, System::Management::Automation::ScriptBlock ^ script);
public PSScriptMethod (string name, System.Management.Automation.ScriptBlock script);
new System.Management.Automation.PSScriptMethod : string * System.Management.Automation.ScriptBlock -> System.Management.Automation.PSScriptMethod
Public Sub New (name As String, script As ScriptBlock)

Parameters

name
String

Name of the method.

script
ScriptBlock

Script to be used when calling the method.

Exceptions

For invalid arguments.

Applies to