Maybe someone will be able to point out what I am missing here.
I am trying to set up a task to send me a DFSR backlog report. Nothing complex. I have 4 groups and I just want the 4 lines below sent in the body of an email.
Problem I am running into is the output for the body of the email is showing up as a single line of text rather than 4 lines.
Get-DfsrBacklog -GroupName * -SourceComputerName "NC-COR-REP" -DestinationComputerName "NH-FS-03" -Verbose 4> "C:\SCRIPTS\verbose.txt" > null $body = Get-Content "C:\scripts\verbose.txt" | Out-String Send-MailMessage -to "Jay <j@company.com>" -from "Jay <j@company.com>" -subject "DFSR Backlog" -BodyAsHtml -body $body -smtpServer mail.company.comRemoving the Send-MailMessage outputs 4 lines.
Thanks