This topic has not yet been rated - Rate this topic

Saving Your Workflow in a Module

Updated: August 29, 2012

Applies To: Windows 8, Windows Server 2012

After authoring a Windows PowerShell script workflow as described in Writing a Script Workflow, or authoring a XAML workflow, you can save the workflow as a module. Storing workflows in a module makes it easier for you to package, distribute, describe, and install them easily.

The example workflow in the following procedure, Install-Role.ps1, is a Windows PowerShell script workflow.

  1. Create a module directory. The following example command creates a module directory called ManagedRoles in the user's Modules directory.

    mkdir C:\Users\CoolDev\WindowsPowerShell\Modules\ManagedRoles

    ImportantImportant
    Do not name a module the same name as any other modules that are located in your module path.

  2. Copy at least one Windows PowerShell script-based or XAML workflow file into the module directory, as shown in the following example command.

    copy-item .\Install-Role.ps1 -dest C:\Users\CoolDev\WindowsPowerShell\Modules\ManagedRoles

See Also

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.