October 2017
Intermediate to advanced
440 pages
11h 47m
English
Languages such as Batch scripting (on Windows) or Bash scripting (ordinarily on Linux or Unix) use a pipeline to pass text between commands. It is up to the next command to figure out what the text means.
PowerShell, on the other hand, sends objects from one command to another.
The pipe (|) symbol is used to send the standard output between commands.
In the following example, the output of Get-Process is sent to the Where-object command, which applies a filter. The filter restricts the list of processes to those that are using more than 50MB of memory:
Get-Process | Where-Object WorkingSet -gt 50MB
Read now
Unlock full access