title: Powershell v2 prompting for value in foreach
body: <p>This code runs in PowerShell v1 but not in PowerShell v2. It now prompts for a value:</p>
  
  <p><img src="https://i.stack.imgur.com/m0asK.png" alt="enter image description here"></p>
  
  <pre><code>Get-ChildItem -Path $source -Filter "*.journal" | 
   Where-Object { $_.Name -match 'SoundPC\[\d{1,12}-\d{1,12}\].journal' } | Sort-Object -Property CreationTime | ForEach-Object 
  {
  
  $sourcefile = $_.Name
  
  }
  </code></pre>
  
  <p>Can someone help?</p>