Workflow script doesn't see functions (paralalism in deploymentscripts)

Welcome Forums General PowerShell Q&A Workflow script doesn't see functions (paralalism in deploymentscripts)

This topic contains 1 reply, has 2 voices, and was last updated by

4 years, 4 months ago.

  • Author
  • #19435

    Points: 0
    Rank: Member

    hi guys,

    i'm trying to bring down my deployment time on a production website. Its a bunch of scheduled tasks, Windows services and websites.
    Today i deploy this in a sequential order, which is starting to take to long to complete.
    Many of the Windows services can just be deployed, in no specific order. Its always just a (Stop service, overwrite files, Start Service).

    I've been looking a multiple options to do this in parallel from powershell. Start-Job looks nice, but workflow is more interesting as i get to keep all my console output in the same context.

    There is however a problem. The workflow functions, doesn't always recongnize my user-defined powershell functions.
    I see errors like:

    "Microsoft.PowerShell.Utility\Write-Error : The term 'Deploy-Website' is not recognized as the name...."

    I'm new with Workflow, but consider myself a decent powershell user. What the h**** am i doing wrong?
    Attached is a empty "deployment package" with a very raw attampt to use workflow to deploy groups of services.
    The example code has this problem.

  • #19442

    Points: 24
    Team Member
    Rank: Member

    Hi Kasper,

    I'm not an expert on PowerShell workflow but I think you'll need to replace "sequence" with "inlinescript" to use your custom functions.

      Deploy-Ressource -Ressource $Ressource        

      Deploy-Ressource -Ressource $Using:Ressource        


The topic ‘Workflow script doesn't see functions (paralalism in deploymentscripts)’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort