title: Different behaviour of New-PSDrive in script and console
body: <p>I'm having a small problem with powershell that's probably very easy... I get different behaviour if I run a command from the console than from a .ps1 file. The command; </p>
  
  <pre><code>New-PSDrive -PSProvider FileSystem -Name X -Root \\computer_name\x -Persist
  </code></pre>
  
  <p>If I run it from the console I get the behaviour that I want, namely a persistent X: drive that appears in the file manager. If I run it from a script, that only contains this line, I get no persistent drive. </p>
  
  <p>Any thoughts? </p>