title: How can I make PowerShell concatenate some command output and a string?
body: <p>Observe:</p>
  <pre><code>PS Z:\dev&gt; echo $(hg root)\windows
  Z:\dev
  \windows
  PS Z:\dev&gt;
  </code></pre>
  <p>I want to see <strong>Z:\dev\windows</strong>. Trying to quote $(hg root) does not help.</p>
  <p><strong>EDIT</strong></p>
  <p>Observe:</p>
  <pre><code>PS Z:\dev\windows\nc&gt; echo $((hg root).Trim())\Windows
  Z:\dev
  \Windows
  PS Z:\dev\windows\nc&gt; $r = (hg root).Trim()
  PS Z:\dev\windows\nc&gt; echo $r\Windows
  Z:\dev\Windows
  PS Z:\dev\windows\nc&gt; $r = hg root
  PS Z:\dev\windows\nc&gt; echo $r\Windows
  Z:\dev\Windows
  PS Z:\dev\windows\nc&gt;
  </code></pre>
  <p>I would like to narrow the scope of my question. I am specifically interested in a one line solution, since this is how I am used to do it in Bash (<strong>echo `hg root`/windows</strong> just works)</p>
  <p><strong>EDIT 2</strong></p>
  <pre><code>PS Z:\dev&gt; Write-Host $(hg root)\windows
  Z:\dev \windows
  PS Z:\dev&gt; Write-Host $((hg root).Trim())\windows
  Z:\dev \windows
  PS Z:\dev&gt;
  </code></pre>
  <p>Write-Host is no good either - note the space between <strong>Z:\dev</strong> and <strong>\windows</strong> in the output.</p>