February 2019
Intermediate to advanced
626 pages
15h 51m
English
It is possible to add a line break after any of the operators. The most useful place for a line break is often after a logic operator is used to combine several comparisons, for example:
Get-Service | Where-Object { $_.Status -eq 'Running' -and $_.StartType -eq 'Manual'}
One of the less obvious operators is the property dereference operator, .. A line break may be added after calling a method of accessing a property. This is shown in the following example:
{ A long string in a script block }.ToString(). SubString(0, 15). Trim(). Length
Read now
Unlock full access