title: Get-Item fails with closed pipeline error
body: <p>If I have an example function ...</p>
  
  <pre><code>function foo() 
  {
      # get a list of files matched pattern and timestamp
      $fs = Get-Item -Path "C:\Temp\*.txt" 
                 | Where-Object {$_.lastwritetime -gt "11/01/2009"}
      if ( $fs -ne $null ) # $fs may be empty, check it first
      {
        foreach ($o in $fs)
        {
           # new bak file
           $fBack = "C:\Temp\test\" + $o.Name + ".bak"
           # Exception here Get-Item! See following msg
           # Exception thrown only Get-Item cannot find any files this time.
           # If there is any matched file there, it is OK
           $fs1 = Get-Item -Path $fBack
           ....
         }
       }
    }
  </code></pre>
  
  <p>The exception message is ... <code>The WriteObject and WriteError methods cannot be called after the pipeline has been closed. Please contact Microsoft Support Services.</code></p>
  
  <p>Basically, I cannot use <code>Get-Item</code> again within the function or loop to get a list of files in a different folder. </p>
  
  <p>Any explanation and what is the correct way to fix it?</p>
  
  <p>By the way I am using PS 1.0.</p>