This example shows how a function can accept pipelined input, and iterate efficiently.
Note, that the begin and end structures of the function are optional when pipelining, but that process is required when using ValueFromPipeline or ValueFromPipelineByPropertyName.
function Write-FromPipeline{
...