locked
Question about Set-AutomationVariable RRS feed

  • Question

  • The documentation about activity Set-AutomationVariable is (at best) limited however I found article Global Assets that states

    Activities Description

    Get-AutomationVariable

    Retrieves the value of an existing variable.

    Set-AutomationVariable

    Creates a new variable or sets the value for an existing variable.

    However when I tried to use it in a very very simple workbook:

    workflow test-semaphore
    {
            set-automationvariable -name BatchManagerSemaphore -value $true
    }

    I get an error:

    Variable 'BatchManagerSemaphore' not found for account '23956b0f-1671-4ddc-9161-57f6506d286b'

    Now that is true, the variable doesn't exist, however the table above states that Set-AutomationVariable "Creates a new variable or sets the value for an existing variable"

    So something is wrong somewhere. Is it the article or is there a bug in Set-AutomationVariable?

    Thanks in advance
    Jamie

    Thursday, September 4, 2014 8:59 AM

Answers

  • The article is wrong. Set-AutomationVariable can only be used to update an existing variable. I will get the documentation fixed.

    • Marked as answer by Jamie Thomson Thursday, September 4, 2014 7:12 PM
    Thursday, September 4, 2014 6:07 PM

All replies

  • The article is wrong. Set-AutomationVariable can only be used to update an existing variable. I will get the documentation fixed.

    • Marked as answer by Jamie Thomson Thursday, September 4, 2014 7:12 PM
    Thursday, September 4, 2014 6:07 PM
  • Thought as much. Thanks for the reply.
    Thursday, September 4, 2014 7:12 PM