Running Exchange cmdlets through a PowerShell Session

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 Settings\admin.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 Settings\admin.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 : , ,

Leave a Reply

Your email address will not be published. Required fields are marked *