ScriptBlock.Invoke Method
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Invokes the script block with the specified arguments, returning the results as PSObject objects.
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
ScriptBlock Members
System.Management.Automation Namespace
Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
Parameters
- args
The arguments that are needed by the commands or expressions in the script block.
Return Value
A collection of PSObject objects whose base objects are the results of the invocation.| Exception type | Condition |
|---|---|
| SessionStateOverflowException |
The maximum scope depth has been exceeded. |
| RuntimeException |
A script runtime exception has occurred |
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Target Platforms
Windows Developer Preview, Windows Server Developer PreviewReference
ScriptBlock ClassScriptBlock Members
System.Management.Automation Namespace
Other Resources
Windows PowerShell SDKSend comments about this topic to Microsoft.