PowerShell with module vs Exchange Management Shell

exchange-2010powershell

We are working on Exchange through Exchange Management Shell and also PowerShell (snap-in Exchange 2010 added).

My point here is that we have two different series of answers.
EMS and PowerShell have two different behaviors.

Can you help to understand the differences between those two ?
I'm not talking about running scripts, but the way they work, they call Exchange for having such different answers.

Runspace ? Pipeline ? Permissions ?

Thanks in advance for the help you can provide.

Best Answer

I'd never given this much thought, but it appears you're right -- they're different.

Please take a look at this blog post for some more detail. The list doesn't look exhaustive by any means, but it might be a good place to start. The two most interesting points are quoted below --

The Exchange commands using the Exchange Management Shell are implemented as functions. If you load the “Microsoft.Exchange.Management.PowerShell.E2010″ snapin instead of using the Exchange Management Shell the commands are implemented as cmdlets.

If you want to use the systemvariable $?, it is better to use the loaded snapin instead of the Exchange Management Shell because these commands don´t work properly in the Exchange Managemnt Shell. A second problem is the use of the common parameters because they are not implemented for all functions in Exchange Management Shell.