PSScriptMethod(String, ScriptBlock) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.