Running Exchange cmdlets through a PowerShell Session

Share this:

Hello folks,

When you open a Windows PowerShell prompt you cannot run Exchange cmdlets into this prompt, the following error will be occuring:

PS C:Documents and Settingsadmin.DOMAIN> Get-PublicFolder
The term 'Get-PublicFolder' is not recognized as a cmdlet, function, operable program, or script file. Verify the term
and try again.
At line:1 char:16
+ Get-PublicFolder <<<<
PS C:Documents and Settingsadmin.DOMAIN>

So.. How can I start to use cmdlets in an existent PowerShell session without open the Exchange Management Shell? To do that we can use the Add-PSSnapin to load de Exchange Management Shell into the current PowerShell, as it follows:

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

Best Regards,
Anderson Patricio


Technorati : , ,
Del.icio.us : , ,

Written by Anderson Patricio

Anderson Patricio

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at ITPROCentral.com, MSExchange.org, Techgenix.com and Anderson Patricio.org (Portuguese).