none
2007 Exchange Web Service - Get list of devices from an account with C# RRS feed

  • Question

  • Hi.  This is my first post and will try to be as detailed as possible.

    Environement:   Windows Server 2008,  Exchange Server 2007, C#.Net

    Task:  Automate Exchange account removal and remote wipe any devices associate with the account

    Problem:  I am not able to retreive a list of devices associated with an account using EWS from C#.Net

    Our company is a large energy company in the mid-west.  We are improving our automated deprovisioning process and part of that task is to remove email accounts and remote wipe the associated devices for obvious reasons.

    We have tried to use Remote Powershell with a web service but we are on Exchange Server 2007 which doesn't allow Exchange cmdlets to run remote and no hope of an upgrade to Exchange 2010 in the near future.  I have recently been guided down the path of EWS with some success.  I can connect to the exchange server and gain access to an account, it's folders, calendar, just about everything I could want except for the devices associated with the account.

    Does anyone know how to get a list of associated devices on an account and remote wipe them using EWS within the C# development environment?  I am open to combining ideas as long as a solution to my problem is found.

    Thank you for your assistance,

    Steve

    Tuesday, October 25, 2011 2:27 PM

Answers

  • Exchange Web Services wont allow you to remote wipe devices, EWS its basically a Mailbox access API and not a Management Interface which is provided through the Exchange Management Shell. In 2007 you can install the Exchange Management Tools on a non Exchange Server or Workstation and then invoke the cmdlets from that machine eg instrument from a WebService etc which i would say would be your best option.

    The ActiveSync Remote Wipe commands are documented in http://msdn.microsoft.com/en-us/library/dd299441%28v=exchg.80%29.aspx the only other thing you can do with EWS is to list the ActiveSync devices by running enumerating through the ExchangeSyncData folder in the Non_IPM_Subtree of the mailbox

    Cheers
    Glen

     

     

     

    • Marked as answer by Steve01000100 Wednesday, November 2, 2011 2:01 PM
    Thursday, October 27, 2011 4:15 AM

All replies

  • Exchange Web Services wont allow you to remote wipe devices, EWS its basically a Mailbox access API and not a Management Interface which is provided through the Exchange Management Shell. In 2007 you can install the Exchange Management Tools on a non Exchange Server or Workstation and then invoke the cmdlets from that machine eg instrument from a WebService etc which i would say would be your best option.

    The ActiveSync Remote Wipe commands are documented in http://msdn.microsoft.com/en-us/library/dd299441%28v=exchg.80%29.aspx the only other thing you can do with EWS is to list the ActiveSync devices by running enumerating through the ExchangeSyncData folder in the Non_IPM_Subtree of the mailbox

    Cheers
    Glen

     

     

     

    • Marked as answer by Steve01000100 Wednesday, November 2, 2011 2:01 PM
    Thursday, October 27, 2011 4:15 AM
  • Hi Glen,

    Thank you for the reply!  We are abandoning the EWS approach but we have already tried the Exchange Mangament Tools on 2007 and it won't work.  We are writing a web service in C# to attempt the remote management of devices. 

    We were able to connect remotely to Exchange Server 2007 using the Exchange Managment Tools on a worksation.  However, we were not able to run any of the Exchange cmdlets.  It turns out Microsoft made Exchange 2007 remote capable for one reason.  This is so both Exchange versions, 2007 and 2010, can coexist on the same machine.  The remote Exchange cmdlets are a one way street to allow Exchange 2007 to manage Exchange 2010.  Remote powershell cmdlets will not run on Exchange. 

    If you have any examples or url's for us to research which were successful using the admin tools snap-in it on a remote computer using powershell we would greatly appreciated it.  Our search on the web has yielded dead ends so far.

     

    Steve

    Monday, October 31, 2011 8:10 PM
  • >We were able to connect remotely to Exchange Server 2007 using the Exchange Management Tools on a workstation. However, we were not >able to run any of the Exchange cmdlets. It turns out Microsoft made Exchange 2007 remote capable for one reason. This is so both Exchange >versions, 2007 and 2010, can coexist on the same machine. The remote Exchange cmdlets are a one way street to allow Exchange 2007 to >manage Exchange 2010. Remote powershell cmdlets will not run on Exchange.

    This isn't correct the Exchange 2007 management tools have nothing to do with 2010 and have nothing to do with coexistence it sounds like you maybe confusing different versions also dont confuse remote powershell and the Exchange 2007 cmdlets. Remote powershell doesn't work with Exchange 2007 the Exchange 2007 powershell snapin always runs in local powershell session and can be run locally from a remote machine (eg non Exchange Server). As for install have a read of http://social.technet.microsoft.com/Forums/en-US/w7itproappcompat/thread/5809010c-977b-478f-84e1-44448737830c/ and also http://knicksmith.blogspot.com/2007/03/managing-exchange-2007-recipients-with.html

    Cheers
    Glen

     

     

    Tuesday, November 1, 2011 4:01 AM
  • Thanks for all your help Glen!  I have marked your repsonse as the correct answer.
    Wednesday, November 2, 2011 2:02 PM