Redirecting to null

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()
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.56.114