This topic has not yet been rated - Rate this topic

ScriptBlock.InvokeReturnAsIs Method

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Runs the script block with the specified arguments. This method returns the raw (unwrapped) result objects so that it can be more efficient.


Namespace: System.Management.Automation
Assembly: System.Management.Automation (in System.Management.Automation)
'Usage
Dim instance As ScriptBlock
Dim args As Object()
Dim returnValue As Object

returnValue = instance.InvokeReturnAsIs(args)
public Object InvokeReturnAsIs (
	params Object[] args
)
public Object InvokeReturnAsIs (
	Object[] args
)
public function InvokeReturnAsIs (
	... args : Object[]
) : Object

Parameters

args

The arguments to pass to this script block. The arguments show up in the script as $args.

Return Value

Returns Objects that are generated during the running of the script block. They may or may not be wrapped in PSObjects. It is up to the caller to check what type of object is returned.
Exception type Condition
SessionStateOverflowException

The maximum scope depth has been exceeded.

RuntimeException

A script runtime exception occurred.

FlowControlException

An internal (non-public) exception was thrown from a flow control statement.

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 Preview

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)