title: Why is my CloudFormation command failing?
body: <p>My command:</p>
  
  <pre><code>"7-set-up-default" : {
          "command" : { "Fn::Join" : ["", [
                                  "robocopy /move C:\\inetpub\\wwwroot\\ C:\\inetpub\\wwwroot\\Default\\\n",
                                  "powershell \"Import-Module WebAdministration;",
                                               "Set-ItemProperty 'IIS:\\Sites\\Default Web Site' -name physicalpath -value 'C:\\inetpub\\wwwroot\\Default\\'\""
                              ]]},
          "waitAfterCompletion" : "0"
        },
  </code></pre>
  
  <p>Fails with this not-so-helpful stack trace:</p>
  
  <pre><code>Error encountered during build of config: Command 07-set-up-default failed
  Traceback (most recent call last):
    File "cfnbootstrap\construction.pyc", line 513, in run_config
    File "cfnbootstrap\construction.pyc", line 125, in run_commands
    File "cfnbootstrap\command_tool.pyc", line 113, in apply
  ToolError: Command 07-set-up-default failed
  2013-08-18 08:35:29,611 [ERROR] Unhandled exception during build: Command 07-set-up-default failed
  Traceback (most recent call last):
    File "cfn-init", line 122, in &lt;module&gt;
    File "cfnbootstrap\construction.pyc", line 117, in build
    File "cfnbootstrap\construction.pyc", line 502, in build
    File "cfnbootstrap\construction.pyc", line 513, in run_config
    File "cfnbootstrap\construction.pyc", line 125, in run_commands
    File "cfnbootstrap\command_tool.pyc", line 113, in apply
  ToolError: Command 07-set-up-default failed
  </code></pre>
  
  <p>However, pasting my command directly into a cmd window works fine:</p>
  
  <pre><code>robocopy /move C:\inetpub\wwwroot\ C:\inetpub\wwwroot\Default\
  powershell "Import-Module WebAdministration;Set-ItemProperty 'IIS:\Sites\Default Web Site' -name physicalpath -value 'C:\inetpub\wwwroot\Default\'"
  </code></pre>
  
  <p>Can anyone help?</p>