1

I've connected to EMS from Windows Powershell using the below:

&"C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1 "

I can't run Get-ExCommands or Disable-Mailbox -Identity Test without getting an error. "The term Get-ExCommands is not recognized as the name of a cmdlet, function, script..."

Is it possible to run Exchange commands in Win Powershell?

Mike
  • 67
  • 1
  • 2
  • 11

2 Answers2

2

This works fine for me:

. 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'
Connect-ExchangeServer -auto

If you did not install the Exchange Management Tools on the server you are using you can connect to exchange this way:

$s = New-PSSession -ConnectionUri http://putyourservernamehere/Powershell  -ConfigurationName Microsoft.Exchange 
import-pssession $s
TomG
  • 188
  • 5
0

I suspect you need to import the Exchange PowerShell module. Take a look at this: Exchange Powershell - How to invoke Exchange 2010 module from inside script?

SolidSid
  • 319
  • 1
  • 10