gc d:\vm.txt|foreach -begin {write-host "It's beginning."} -process {$_ +"aa"} -end {write-host "The end"}