title: How to get carriage return in my email body in powershell script?
body: <p>I have created a powershell script to gather some system stats and email them, I would like to get carriage returns  in the body so that everything is not jumbled up.</p>
  
  <p>Anyone know how I would archieve this with the script below?</p>
  
  <pre><code>Process{
   $strComputerName = (Get-WmiObject -Class Win32_ComputerSystem | Select-Object Name).Name
   $strComputerModel = (Get-WmiObject -Class Win32_ComputerSystem | Select-Object Model).Model
   $strSerialNumber = (Get-WmiObject -Class Win32_BIOS | Select-Object SerialNumber).SerialNumber
   $strDate = Get-Date
   $erroractionpreference = "SilentlyContinue"
   $strSMTP = $server
   $strSubject = $subject
   $strBody = "Hostname: $strComputerName Model: $strComputerModel Serial: $strSerialNumber Date: $strDate"
   $MailMessage = New-Object System.Net.Mail.MailMessage
   $MailMessage.IsBodyHtml = $true
   $SMTPClient = New-Object System.Net.Mail.smtpClient
   $SMTPClient.host = $strSMTP
   $Sender = New-Object System.Net.Mail.MailAddress($from, "ConfigMgr")
   $Recipient = New-Object System.Net.Mail.MailAddress($to)
   $MailMessage.Sender = $Sender
   $MailMessage.From = $Sender
   $MailMessage.Subject = $strSubject
   $MailMessage.To.add($Recipient)
   $MailMessage.Body = $strBody
   $SMTPClient.Send($MailMessage)
  }
  </code></pre>
  
  <p>Trying to get CR for the $strBody output.. anyone?</p>
  
  <p>Thanks :)</p>