title: Are pipeline variables available in PowerShell task in Azure DevOps?
body: <p>I have this PowerShell script, that reads some environment variables and outputs them:</p>
  
  <pre><code>Write-Host "name: $(tenantName) version: $(versionRelease) url: $(urlApplication)"
  </code></pre>
  
  <p>Those variables are defined as pipeline variables and also in variable groups in an Azure DevOps release pipeline.</p>
  
  <p>When run inside a <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/powershell?view=azure-devops" rel="noreferrer">PowerShell task</a> defined as <strong>Inline</strong>, this script works as expected. However, the same exact script won't work when the PowerShell task is configured with a <strong>File Path</strong>. In this case, the <code>tenantName</code> env variable is not found:</p>
  
  <pre><code>tenantName : The term 'tenantName' 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.
  </code></pre>
  
  <p>Is there any way to make the environment variables available to a "File" script as they are to an "Inline" one?</p>