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 : , , : , ,

Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at, and (Portuguese).