PowerShell Workflows Nesting :call a workflow from inlinescript RRS feed

  • Question

  • Hello Team,

    I am working on one of the project, for which i have developed multiple workflows and few of the workflows uses inlinescript.

    currently i am not bale to call a workflow from inlinescript. need help on the same.

    Example script:

    workflow abc{
    Write-Verbose "I am abc"
    workflow abc1{
    Write-Verbose "I am abc1"
    workflow abc2{
    abc2 -Verbose

    Error :

    VERBOSE: [localhost]:I am abc1
    The term 'abc' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was 
    included, verify that the path is correct and try again.
        + CategoryInfo          : ObjectNotFound: (abc:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
        + PSComputerName        : [localhost]


    sridhar v

    • Moved by Bill_Stewart Wednesday, December 12, 2018 8:17 PM Unanswerable drive-by question
    Wednesday, July 25, 2018 6:48 AM

All replies

  • You cannot call a workflow from an inline script.


    Wednesday, July 25, 2018 7:11 AM
  • Yup, you can't call workflow inside inlinescript, give a shot using Invoke-AWsorkFlow (outside of workflow)

    Regards kvprasoon

    Sunday, August 26, 2018 10:36 AM