title: Expand variable inside single quotes
body: <p>How can I expand <code>$pw</code> inside single quotes?</p>
  
  <pre><code>$pw = "$PsHome\powershell.exe"
  cmd.exe /c 'schtasks /create /tn cleanup /tr "$pw -WindowStyle hidden -ExecutionPolicy Bypass -nologo -noprofile %TEMP%\exec.ps1" /sc minute /mo 1'
  </code></pre>