title: Powershell concatenate an Environment variable with path
body: <p>So I have this code:</p>
  
  <pre><code>$userprofile=Get-ChildItem Env:USERPROFILE
  $localpath="$userprofile\some\path"
  </code></pre>
  
  <p>I would expect output of the below from <code>$localpath</code>:</p>
  
  <pre><code>c:\users\username\some\path
  </code></pre>
  
  <p>However what I get is:</p>
  
  <pre><code>System.Collections.DictionaryEntry\some\path
  </code></pre>
  
  <p>So, of course, something like <code>cd $localpath</code> fails. How would I accomplish what I need? </p>