title: How to run a bat file with variable in path
body: <p>I'm trying to make an audit script and some of my existing scripts are .bat files that I want to run from powershell and check the output for success/failure.</p>
  
  <p>I have tried using start-process, but I can't capture the output right.  The way I have seen output grabbed was by running the .bat by assigning it to a variable.  My path however starts with a variable drive letter (as it is run off a USB.</p>
  
  <pre><code>$batExample = $USB\Audit\Script\Agent.bat
  </code></pre>
  
  <p>is sort of what I want, but that won't run as it is an unexpected token.</p>
  
  <p>Have tried</p>
  
  <pre><code>$batExample = "$USB\Audit\Script\Agent.bat"
  and 
  $batExample = "$USB"\Audit\Script\Agent.bat
  </code></pre>
  
  <p>I am new to powershell.  Is there an escape key I am missing?  </p>
  
  <p>I am sure it is a small syntax problem, but I have tried all the steps I can think of.  Thanks!</p>