title: How to clear only certain contents from the screen?
body: <pre><code>Function Test{
      while($true){
      write-host "I want this to refresh every time"
      Start-Sleep -Seconds 4
      cls
      }
  }
  Write-Host "I want this to be at the screen always"
  Test
  </code></pre>
  
  <p>Is there a way for me to get this done other than putting it also inside the loop or function ? In the actual code I want to keep some output at the top of the screen for reference(it cannot be put inside the function), while the function pulls some data and refresh every 4 seconds. 
  Here since I use <code>cls</code> it clears everything on the screen which I do not want to happen. I only needs to clear the output from the function.</p>