title: Copy-Item throws Null reference exception
body: <p>I am trying to copy a file from Guest Linux VM to Host Hyper V windows machine.
  I am using powershell to copy the file from guest vm(linux) to Host(windows).</p>
  <pre><code>Write-Host &quot;$session, $TestLogPath, $destLogs&quot; #all variables are valid and not null
  Copy-Item -FromSession $session -Path $TestLogPath/Test.txt -Destination $destLogs
  </code></pre>
  <p>I get the following error while doing that:</p>
  <blockquote>
  <p>Object reference not set to an instance of an object.
  + CategoryInfo          : NotSpecified: (:) [Copy-Item], NullReferenceException
  + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.CopyItemCommand
  + PSComputerName        : 10.218.10.13</p>
  </blockquote>
  <p>I am not sure what this error is since the desired file is copied successfully from Linux VM to Windows Host.
  Any one has any idea why this error is shown despite file copied successfully from Linux VM to Host machine.</p>