title: Expanding variables in file contents
body: <p>I have a file <code>template.txt</code> which contains the following:</p>
  
  <pre><code>Hello ${something}
  </code></pre>
  
  <p>I would like to create a PowerShell script that reads the file and expands the variables in the template, i.e.</p>
  
  <pre><code>$something = "World"
  $template = Get-Content template.txt
  # replace $something in template file with current value
  # of variable in script -&gt; get Hello World
  </code></pre>
  
  <p>How could I do this?</p>