title: New-PsDrive Remote copy from DFS share errors: A specified logon session does not exist
body: <p>So to recap the situation:  I am at one computer trying to run powershell using <code>enter-pssession computername</code>, then from the remote session, run the logic below:</p>
  
  <pre><code>$DFSPath = "\\DFSpath.com"
  $RDL1 = [char](1+[char](gdr ?)[-1].name)
  New-PSDrive -Name $RDL1 -PSProvider FileSystem -Root $DFSPath -Persist -credential domain\UN
  </code></pre>
  
  <p>The get-variable shows the variables properly.  But when I try to create with <code>New-PSDrive</code>, it gives:</p>
  
  <pre><code>New-PSDrive : A specified logon session does not exist. It may already have
  been terminated
  </code></pre>
  
  <p>I did look at this: <a href="https://stackoverflow.com/questions/2233758/powershell-2-0-accessing-windows-shares-during-a-remote-session">PowerShell 2.0: Accessing Windows Shares during a Remote Session</a> but wasn't able to get it to work.  Also I wouldn't know how to devise it in my script above (which will be run on multiple computers).  Is there anything newer?  I am using v3 powershell.  Thanks so much!</p>