Check out his whole post here
We already know that Monad is as powerful (or more) than some programming languages. But is it required to do complex scripting in Monad to do simple things? Do you have to learn all the knob and switches in order to use it to manage Exchange? When we started designing the Exchange cmdline and scripting interface, we made absolutely sure that 80% of our customers, who normally have little or no scripting experience, can still use Monad/Exchange cmdline to auotmate or perform their tasks. Eileen has a similar question on her weblog as well. Let me give some examples (these are all public already so you’ll have to wait for new stuff later on, sorry!):
get-mailbox -server LAServer | move-mailbox -targetdatabase OaklandSG\OaklandMDB
What is this line doing? It looks cryptic as the syntax is new and there’s the new operator “|” in the middle of the sentence. The “|” character should already be familar to the unix folks, and is possibly the first (and only?) concept that you have to learn to get some good mileage out of the Exchange cmdline. What it means is: take the results of the operation on the left hand side and pass those results to the operation on the right hand side. Like this:
- Joel
The power shell team adds a little bit more to Vivek's explaination here
PSMDTAG:FAQ: How can I pipeline data to a parameter which does not accept pipeline input?PSMDTAG:FAQ: What are ScriptBlock Parameters?
One of the foundation concepts of Windows PowerShell is pipelining objects instead of text. What happens is that when an upstream command generates an object, the PowerShell engine examines the data requirements of the next pipeline element and then binds the pipeline object to it. That binding can either be:
You can see this when you look at the Parameter section of the help for any cmdlet. Take a look at the Help for Get-Process, you see the following:
Continue at source