Hi all,
Can anyone explain to me any practical differences between the Exchange Management Shell, and a Powershell console with the Exchange snapin loaded? In terms of running the cmdlet 'Get-ActiveSyncDevice', at least.
The problem I'm having is that I have a script that I want to schedule to report on various things about Exchange ActiveSync. I've got a server that can run this, and a service account to use. In building the script I've tested it under the Exchange Management
Shell, and it runs fine. However, task scheduler just calls powershell.exe, and this is where my script fails. I know about loading the exchange tools, so the first line of my script is:
Add-PSSnapin Microsoft.Exchange.Management.Powershell.E2010
However a specific cmdlet, Get-ActiveSyncDevice, doesn't seem to work. I can have open, side-by-side: the Exchange Management Shell, and then a normal Powershell console with the Exchange Snapin loaded. In both windows, get-mailbox will work as normal. However Get-ActiveSyncDevice will work in the EMS but not in the normal Powershell console - I just get:
"There are no Exchange ActiveSync organisation settings configured for Organisation ."Can anyone tell me why this is, and how I can make Get-ActiveSyncDevice work in a normal Powershell window?
Thanks for reading,
Aled