title: How do I print out the results of my delete script in Powershell
body: <p>I'm trying to find a way to get my script to print out a log file of what files are actually being deleted. Does anyone know how I could go about doing this? Here is my screen I would like to add that onto.</p>
  
  <pre><code>Where-Object { -not $_.PSIsContainer -and $_.LastWriteTime -lt (Get-Date).AddDays(-1) } |
      Remove-Item -Force 
  </code></pre>