Pass a variable from Powershell to a text yaml file RRS feed

  • Question

  • Hi, I want to send a variable from powershell to yaml file

    Ive tried this :

    Set-Variable -Name "name" -Value "value"

    And catched it in the yaml with : ${name}

    But I still get this error when I run the yaml :

    WARNING: The name variable is not set. Defaulting to a blank string.

    • Edited by LaQuica Thursday, March 12, 2020 4:42 PM
    Thursday, March 12, 2020 4:41 PM

All replies

  • Don't use the subexpression operator.  Just use the variable.

    PS C:\scripts> $name = 'somevalue'
    PS C:\scripts> $name
    PS C:\scripts>


    Thursday, March 12, 2020 5:37 PM