ActivityGenerator.GenerateFromCommandInfo Method (CommandInfo, String)

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. This SDK programming element is introduced in Windows PowerShell 3.0.

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

Dim command As CommandInfo
Dim activityNamespace As String
Dim returnValue As String

returnValue = ActivityGenerator.GenerateFromCommandInfo(command, activityNamespace)

public static string GenerateFromCommandInfo (
	CommandInfo command,
	string activityNamespace
public static String GenerateFromCommandInfo (
	CommandInfo command, 
	String activityNamespace
public static function GenerateFromCommandInfo (
	command : CommandInfo, 
	activityNamespace : String
) : String



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


The namespace that contains the command.

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

© 2015 Microsoft