title: Powershell variables in command not working
body: <p>I've tried a ton of different variations of this, but I can't get it to work. I am trying to run mysqldump to export a database (in this case called global).</p>
  
  <pre><code>PS C:\Users\Administrator&gt; &amp;"$mysqlpath\mysqldump.exe -u$mysqluser -p$mysqlpass --databases global | Out-File $env:TEMP\database_backup\global_$timestamp.sql -Encoding UTF8"
  &amp; : The term 'C:\Program Files\MySQL\MySQL Server 5.6\bin\mysqldump.exe -ubackup -pbackup_password --databases global | Out-File C:\Users\ADMINI~1\AppData\Local\Temp\2\database_backup\global_2013-12-11T11:47:28.sql -Encoding UTF8' 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.
  At line:1 char:2
  + &amp;"$mysqlpath\mysqldump.exe -u$mysqluser -p$mysqlpass --databases global | Out-Fi ...
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ObjectNotFound: (C:\Program File... -Encoding UTF8:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
  </code></pre>
  
  <p>It looks like it is being exploded into the proper variable names, but I can't get it to run.</p>
  
  <p><strong>UPDATE</strong>: So that was the right answer, I had a : in the timestamp. My other problem was solved by putting the variables inside double quotes (")</p>