February 2019
Intermediate to advanced
626 pages
15h 51m
English
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()
Read now
Unlock full access