title: Powershell issue when executing .ps1 script
body: <p>So, warning, this is probably a really newbie questions, so apologies in advance.</p>
  
  <p>I'm starting to learn Powershell and one of the first things I want to do, is just make a directory &amp; copy a file to it.</p>
  
  <p>Now, if I use the following commands in a CMD window, they work perfectly.</p>
  
  <pre><code>mkdir %HOMEPATH%\test
  
  cp test.txt %HOMEPATH%\test
  </code></pre>
  
  <p>However, when I put them into a .ps1 file and execute it, I get an error saying the directory could not be found etc (see below)</p>
  
  <p><code>Copy-Item : Could not find a part of the path 'C:\Chef\windowsdevbox-master\%HOMEPATH%\.berkshelf</code>'</p>
  
  <p>Now, I got told that this is because I need to put CMD before each command. I ran this, with the CMD in front of each one and the error disappeared and instead I was presented with the "Home text" for CMD and the script finished.</p>
  
  <pre><code>Microsoft Windows [Version 6.1.7601]
  Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
  </code></pre>
  
  <p>However, the folder was not created and the file was not copied over.</p>
  
  <p>I just wondered what I need to do to get this to work.</p>