Adding Windows PowerShell Activities to the Visual Studio Toolbox
Before you author a PowerShell Workflow using Workflow Designer, you must first add the PowerShell Activities to the Toolbox in a Visual Studio Workflow console application project. The following procedure shows how to add the activities from the Microsoft.PowerShell.Core.Activities assembly to the Visual Studio toolbox.
Adding Windows PowerShell Activities to the Toolbox
Create a new Workflow console application project in Visual Studio.
On the View menu, click Toolbox.
Add a new tab in the Toolbox by right-clicking inside the Toolbox and clicking Add Tab, and give the new tab a name such as “PowerShell Activities”.
Adding a tab allows you to group the PowerShell Activities separate from other tools in the Toolbox.
On the new Toolbox tab, click Choose Items…. The Choose Toolbox Items dialog appears.
In the Choose Toolbox Items dialog, click the System.Activities tab.
Navigate to the %WINDIR%\Microsoft.NET\assembly\GAC_MSIL\Microsoft.PowerShell.Core.Activities\v4.0_18.104.22.168__31bf3856ad364e folder and double-click Microsoft.PowerShell.Core.Activities.dll.
Click OK. The activities defined by the Microsoft.PowerShell.Core.Activities assembly are now available in the toolbox.