Logging mid pipe in Powershell

I've been writing a lot of powershell recently and I really like the functional aspect of piping: $Websites | Stop-Website -Passthru | Remove-Website As it's a lot easier to read than constantly using foreach to iterate through collections. The Stop-Website cmdlet will stop the website and pass on an object that the…

Read this article