Redirection to null, such as Out-Null, can be added at the end of a statement to discard output. This is shown here:
using namespace System.Text
$service = Get-Service | Select-Object -First 1
$stringBuilder = [StringBuilder]::new()
$stringBuilder.AppendFormat('Name: {0}', $service.Name).AppendLine().
AppendFormat('Status: {0}', $service.Status).AppendLine().
AppendLine() > $null
$stringBuilder.ToString()