title: Is there any way to avoid the line break when using Read-Host?
body: <p>I am working on a Powershell script for our support guys, to help them in their day to day tasks.
  I have some experience with Powershell, but by far not a hardcore programmer.</p>
  
  <p>I believe my question is fairly basic, even though I have not been able to find the exact answer yet.</p>
  
  <pre><code>function f_LOCAL_CheckADUser($strInitials)
  {
      try
      {
          $TestVariable = Get-ADUser -Identity $strInitials -Properties *
          Write-Host " - approved" -ForegroundColor Green
      }
      catch
      {
          Write-Host " - does not exist" -ForegroundColor Red
      }
  }
  
  $Internal_Initials = Read-Host " Enter initials"; f_LOCAL_CheckADUser $Internal_Initials
  </code></pre>
  
  <p>What is happening: The user enters someone’s initials (SamAccountName), the entry is then checked against our AD to see if the user exists, this is working just fine, but the “approve” / “does not exist” line is being printed on the line below what the user entered.</p>
  
  <p>This is what it looks like now:</p>
  
  <p><a href="https://i.stack.imgur.com/XA0Sr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XA0Sr.png" alt="Present outcome"></a></p>
  
  <p>My question is then, is there any way to avoid the line break, and have the “approve” / “does not exist” be printed on the same line as where the user entered the input?</p>
  
  <p>Would like it to be displayed like this:</p>
  
  <p><a href="https://i.stack.imgur.com/QIUii.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QIUii.png" alt="Desired outcome"></a></p>
  
  <p>I have been searching far and wide, and actually found some inspiration on how to blank out a line and replace it with a new one, but that seems a little overkill. So I am hoping a simple solution may exist.</p>
  
  <p>Inspiration: <a href="https://stackoverflow.com/questions/25846889/powershell-overwriting-line-written-with-write-host">PowerShell - Overwriting line written with Write-Host</a> credit to Boluwade Kujero for posting the reply. </p>