Best development technologies to use to connect to exchange server, discover DAGs, creating mailbox data bases etc... (preferably in C#. .net) - exchange-server

I am new to Development with Exchange server. I am trying to do things like conencting to exchange server, discovering and creating Database Availablity Groups (DAG), discovering and creating mail box databses within a DAG etc... programmatically.
I see there are few PowerShell cmdlets to do the above things. I am wondering what is the best development technology to use for above things? Can i use EWS Manamgement API?
the technology should be compatible with Exchange Server 2010 and 2013 and preferably .net (C# - please note that i am trying to manage remote exchange servers)
regards,
Dreamer

The only option to manage exchange server is wrapping exchange management shell cmdlets in c# and invoking them.
Please see http://social.msdn.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/155504b3-ffe3-4bdf-887a-1e61842a8697 for more details.
thank you,
Dreamer

Related

Reading Exchange 2003 WebDAV custom properties with EWS after upgrading to Exchange 2010

I have an old Exchange 2003 server that we connected to via WebDAV. We had one app using it and in it we were setting some custom properties to appointments in the DAV namespace like DAV:OrderId, where OrderId is the name of the custom property.
Now we're going to move the mailbox to Exchange 2010 to start with and since there's no WebDAV support for it, I can't find a way how to read that custom property with Managed EWS (Exchange Web Services).
I tried getting them with searching through
DefaultExtendedPropertySet.Common
and
DefaultExtendedPropertySet.PublicStrings
collections, but of course they're not there.
Our app kind of needs those properties to work.
Anyone have any ideas?
Sorry I can't be more specific here, but I've not wanted to grab any custom properties off Exchange items. However, there is a way to get MAPI props in EWS, and there may be a way to dig out the custom props as well. It's worth a look. Start here, and let us know if you work it out!
Well I found what I was doing wrong.
By using MFCMapi on the Exchange 2003 server I was able to see that the actual full property name is "DAV:OrderId" and not just "OrderId". It's namespace is DefaultExtendedPropertySet.PublicStrings. So just use those two pieces of information when querying with EWS and you're good to go.

Where can I find which properties are available in each Exchange Web Services version?

First of all, I have pretty much no experience with developing Exchange Web Services-based applications.
I am developing an application that uses EWS Managed API to connect to an Exchange server. I need to support multiple Exchange versions, as I can't know in advance what version the server I'll be connecting to is running.
I was reading this article: https://msdn.microsoft.com/en-us/library/office/dd633705(v=exchg.80).aspx, and in the Unsuccessful Versioning part, it's written:
The EWS Managed API will throw an exception if the example is run because the IsAssociated property on the EmailMessage object is not available in Exchange 2007 SP1.
My question is: is there a list of which properties are available (or unavailable) in each Exchange version?
You have to keep in mind that the EWS ExchangeVersion (schema version) is not the same as the Service Version, on which Exchange is running.
Microsoft says:
[...]applications designed against earlier versions of EWS will work, in most cases, with later versions of EWS, and applications that target later versions of EWS will work if the same functionality was included in an earlier version.
You can find further information about schema versioning and your requested feature set per schema version here: https://msdn.microsoft.com/en-us/library/office/dn741586(v=exchg.150).aspx
There is no list of properties that i know off probably the closest would be if you look at the EWS Managed API source https://github.com/OfficeDev/ews-managed-api/tree/154dbc66ac018d861c73ce489839cd9f58a1b0cd/ComplexProperties .
There are strongly typed properties which Microsoft have made available on the EWS objects and you can also access the underlying extended properties these strongly type properties refer to (or that no strongly type property exists). Just because a property isn't strongly typed in a certain version of EWS doesn't mean its not accessible its just you need to use another method more on that https://msdn.microsoft.com/en-us/library/office/dn467898(v=exchg.150).aspx
There is a list of which EWS operations are available in which versions https://msdn.microsoft.com/en-us/library/office/bb409286(v=exchg.150).aspx which is generally the more important. (Eg FAI Folder Associated Item traversals where first introduced in 2010 hence why isAvailble isn't in 2007).

MAPI access to Exchange Server 2010 vs EWS

I am trying to access some room mailbox information from a web application while connecting to Exchange Server 2010. Using the EWS, I am unable to get some AD properties such as room capacity or customly defined properties for the given rooms. However, querying directly through LDAP is not an option since the web application is external and has no access to any domain controllers.
From what I saw, a viable option would be to use MAPI in order to get the contacts from Exchange and then look for the given properties. In order to perform this kind of integration, I have the following questions:
1) Is it possible to use a standalone version of the MAPI interfaces - i.e. without Outlook installed - ?
2) Can MAPI client functions and objects be used from a server environment - i.e. no user input available - ?
3) Is there any way to use MAPI from managed code - C# or others - ?
4) Are there any other options of getting the aforementioned properties from Exchange?
1, 2 & 3) Yes. I use Redemption library for this
4) I only know about EWS & Mapi, so I think there is no other way.
Note: Before going ahead you should be sure these information are available from MAPI. Because Exchange is different from Active Directory.
This SO question may help you.

Exchange ews api, list all users

I am trying to retrieve all users of an exchange server using EWS API, as this answer suggested, it's possible to do with powershell. However, I will need perform this task to many servers, running the script in each server is very time consuming, configuring remote EMC seemed not easy either.
So, I am thinking of implement this with C#, looping through each server and retrieve user list and save it in a database. But I couldn't find the EWS equivalent to "Get-Mailbox"
powershell command?
What should I do with this situation?
You can use PowerShell cmdlets with C# applications. There is a short example of using cmdlets with Exchange in the Exchange Management Shell SDK.

MS Exchange Server 2003: any good scripting tutorial?

I need to write a script for MS Exchange Server 2003 that will analyze incoming emails and put some of them into a specific mailbox. Of course it's a lot of information about Exchange Server scripting at MSDN, but amount of information there is very huge. Is it some simple tutorials available that will describe how to install a simple script on MS Exchange Server that will analyze incoming emails?
I believe the only way to accomplish what you want in exchange 2003 is to write an smtp event sink. Here is an overview. http://www.codeproject.com/KB/cs/csmanagedeventsinkshooks.aspx
Unfortunately, event sinks can be prone to have very poor performance characteristics and are generally discouraged. However, I believe that is the way to accomplish what you want to do.
If you decide to go down this path, here are a couple of references for you:
http://support.microsoft.com/kb/894286 and
http://msdn.microsoft.com/en-us/library/ms998610.aspx
Try these? (the first one is for exchange 07)
http://www.codeproject.com/KB/exchange/Exchange2007EWS-Part1.aspx
http://www.codeproject.com/KB/cs/Exchange_2003_with_WebDav.aspx

Resources