The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ActivityGenerator.GenerateFromCommandInfo Method (CommandInfo, String)


Updated: April 27, 2016

Applies To: Windows PowerShell

Generates source code for a Workflow activity by using the specified CommandInfo object. This source code can then be compiled to create an assembly. By default, the activity wrapper uses the remoting command base. Introduced in Windows PowerShell 3.0.

Namespace:   Microsoft.PowerShell.Activities
Assembly:  Microsoft.PowerShell.Activities (in Microsoft.PowerShell.Activities.dll)

public static string GenerateFromCommandInfo(
	CommandInfo command,
	string activityNamespace


Type: System.Management.Automation.CommandInfo

The name of the command for which to create the activity.

Type: System.String

The namespace that contains the command.

Return Value

Type: System.String

A string representing the C# source code of the generated activity.

Return to top

Community Additions