Alright pipelining in PowerShell proved to be helpful tonight. Here a quick example to get you combining multiple cmdlets.
First of lets look at a single cmdlet. Type this into your PowerShell terminal.
That cmdlet uses a wild card that will list off all process on your local machine. Now lets add another cmdlet into the mix.
get-process * | stop-process
This isn’t a very hard syntax to decode, if you hadn’t notice yet, the pipe command is the “|” character.
Essential what we would be doing is using a stop-process command on each process. Not vary smart thing to do but you can also do something like a foreach loop and target specific processes to either stop or start them with a single line of code.
The built in help has some good infomation on pipelines, type this into your shell.
Additional help can be found from the PowerShell Team,