InvokePowerShell Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Activity that invokes a PowerShell command.

Namespace:  System.Management.Automation.Activities
Assembly:  System.Activities.Extended (in System.Activities.Extended.dll)


<ContentPropertyAttribute("Parameters")> _
Public NotInheritable Class InvokePowerShell _
    Inherits Activity
Dim instance As InvokePowerShell
public sealed class InvokePowerShell : Activity
public ref class InvokePowerShell sealed : public Activity
public final class InvokePowerShell extends Activity
type InvokePowerShell =  
        inherit Activity


Note that to use PowerShell activities, PowerShell must be installed. PowerShell is not installed automatically with .

The InvokePowerShell activities support three types of input:

  • Parameters
    Input parameters to be passed into a PowerShell command. Command parameters always have names and values. For example, the “get-process” command has three named parameters: name, id and inputObject.

  • PowerShell variables
    variables - Used to hold data in PowerShell. Variables start with “$” and can be referenced in scripts.

  • Pipeline input
    Pipeline data is delivered to the InvokePowerShell activity via an InArgument of type IEnumerable<object>. These objects can either be bound by PowerShell to matching parameters or referenced using PowerShell’s built-in variables $input and $.

Inheritance Hierarchy


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Version Information

.NET Framework

Supported in: 4

See Also


InvokePowerShell Members

System.Management.Automation.Activities Namespace