Development ForumTopics discussed include: Web services, APIs, application conversion and apps in general© 2009 Microsoft Corporation. All rights reserved.Thu, 26 Nov 2009 07:28:43 Z9d18fb17-7824-4a44-a58d-42928bc3a451http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d1760b9d-8928-45e8-be18-8e40177b5155http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/d1760b9d-8928-45e8-be18-8e40177b5155arvsrvhttp://social.technet.microsoft.com/Profile/en-US/?user=arvsrvThe item type returned by the service (PostItem) is not compatible with the requested item type (EmailMessage)<span style="font-size:x-small"> <p>I am getting the error when trying to execute the line &quot;email =EmailMessage.Bind(ObjEWSSerrvice, _Item.Id.UniqueId.ToString)&quot;<br/>The error is  &quot;<strong>The item type returned by the service (PostItem) is not compatible with the requested item type (EmailMessage)</strong>&quot; when I am trying to read mail box.  <br/> Can anybody let me know what i am doing wrong<span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small"><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff"> <br/></span></span></span></span></span><span style="font-size:x-small"><span style="font-size:x-small"><br/>ObjEWSSerrvice </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">As</span></span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#0000ff"><span style="font-size:x-small;color:#0000ff">New</span></span><span style="font-size:x-small"> ExchangeService(ExchangeVersion.Exchange2007_SP1)</span><br/>ObjEWSSerrvice.Credentials = New WebCredentials()<br/>Dim inbox As Folder<br/>inbox = Folder.Bind(ObjEWSSerrvice, WellKnownFolderName.Inbox)<br/>If inbox.UnreadCount &gt; 0 Then<br/> Dim view As New ItemView(inbox.UnreadCount)<br/> view.PropertySet = PropertySet.IdOnly<br/> Dim results As FindItemsResults(Of Item)<br/> results = ObjEWSSerrvice.FindItems(inbox.Id, view)<br/> For Each _Item As Item In results.Items<br/>  Dim email As EmailMessage<br/>  email = EmailMessage.Bind(ObjEWSSerrvice, _Item.Id.UniqueId.ToString)<br/>  strSubject = email.Subject<br/>  .......................................<br/> Next _Item<br/>End If<br/><br/></span></p> </span> <p><span style="font-size:x-small"></span></p>Thu, 26 Nov 2009 07:28:43 Z2009-11-26T07:28:43Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/5a095736-db36-420b-8a92-5c3744229c7chttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/5a095736-db36-420b-8a92-5c3744229c7cExchange_buddyhttp://social.technet.microsoft.com/Profile/en-US/?user=Exchange_buddyhow to get deleted appointmentsHello,<br/>           is anyone worked on to get list of deleted appointment with synchronization. I created a appointment and i read it and saved it in my database but i want if i delete it from outlook i should have code which check if any appointment deleted in calendar then i want to delete it in my database as well. please help me out.Mon, 23 Nov 2009 06:49:41 Z2009-11-26T05:14:44Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/b4d61c04-930c-4188-820a-78f842b4dd36http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/b4d61c04-930c-4188-820a-78f842b4dd36Jon747http://social.technet.microsoft.com/Profile/en-US/?user=Jon747How I can get address book from exchange server?<span>Can somebody help me or post sample code, to get address book from exchange server with EWS &amp; C#?</span>Mon, 23 Nov 2009 13:56:29 Z2009-11-26T03:48:03Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/28294de5-f725-4fb5-abfe-f31eb1f8081chttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/28294de5-f725-4fb5-abfe-f31eb1f8081cSaravanan.Thttp://social.technet.microsoft.com/Profile/en-US/?user=Saravanan.TBecome an Exchange DeveloperHi forum members,<br/> <br/>                           I am working as Exchange admin and working on Exchange 2003 &amp; Exchange 2007. I want to develop applications for Exchange server. I know the some basics of C++ &amp; C#.Net. So what are all the basic things i want to know to before exchange app developer and is there any books or CBT's , available for to know the exchange developing? Which programming languages you all prefer to know the exchange development?. Mainly I want to develop Web and DB related applications. Thanks in advance..........<hr class="sig">SaravananThu, 24 Sep 2009 13:30:40 Z2009-11-26T03:37:01Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/db0e86a7-8983-435d-80ac-2c9e49e38481http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/db0e86a7-8983-435d-80ac-2c9e49e38481mailmanZAQasdfhttp://social.technet.microsoft.com/Profile/en-US/?user=mailmanZAQasdfCreating Appointments with Attachments in Outlook Live (Live@Edu) using EWSHi everyone,<br/><br/>I am a simple function that will create an appointment in Outlook Live (<a href="mailto:Live@Edu">Live@Edu</a>).<br/>I have used the EWS Managed API 1.0 and I was able to create the appointment. Now I want to add an attachment to it.<br/><br/>Here is the code I used to add an attachment:<br/><br/>  FileAttachment attachment = exAppointment.Attachments.AddFileAttachment(itemattachment.name, <br/>    itemattachment.contentByte);<br/><br/>The Save() fucntionality of Appointment saved the appointment but not the attachment and the exception message says:<br/><br/>  The request failed schema validation: The element 'FileAttachment' in namespace <br/>  'http://schemas.microsoft.com/exchange/services/2006/types' has invalid child element 'IsInline' in namespace <br/>  'http://schemas.microsoft.com/exchange/services/2006/types'. List of possible elements expected: 'ContentType, <br/>  ContentId, ContentLocation, Content' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.<br/><br/>Hoping to resolve this, I assigned values to ContentType, ContentId, ContentLocation but not Content because it is readonly.<br/><br/>  FileAttachment attachment = exAppointment.Attachments.AddFileAttachment(itemattachment.name, <br/>  itemattachment.contentByte); <br/>  attachment.IsInline = false;<br/>  attachment.ContentType = itemattachment.name.Substring(itemattachment.name.LastIndexOf('.'), <br/>    itemattachment.name.Length - (itemattachment.name.LastIndexOf('.') + 1));<br/>  attachment.ContentLocation = itemattachment.path;<br/>  attachment.ContentId = Guid.NewGuid().ToString();<br/>  attachment.Name = itemattachment.name;<br/><br/>I Still got the same error but this time it is saying that it is because of the Content only which I cannot assign value and I believe the its value has been assigned during the call of the function :<br/><br/>  FileAttachment attachment = exAppointment.Attachments.AddFileAttachment(itemattachment.name,  <br/>    itemattachment.contentByte);<br/><br/>I check out the property of Content and it says there that &quot;Content is set only when the FileAttachment.Load() method is called&quot;<br/><br/>So I tried using the Load() by:<br/><br/>  attachment.Load(itemattachment.path);<br/><br/>Then a new error occured and it says &quot;The request failed schema validation: The required attribute 'Id' is missing&quot;.<br/><br/>I did follow the MSDN sample for EWS Managed API 1.0 for creating attachments but it did not work. Now I'm already stuck with this.<br/><br/>How can I resolve this?<br/>Thanks for the help.Wed, 25 Nov 2009 05:47:07 Z2009-11-26T01:40:54Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/0d582fcb-6a47-4de1-8ace-ec8ba4a336c3http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/0d582fcb-6a47-4de1-8ace-ec8ba4a336c3Entrancee80http://social.technet.microsoft.com/Profile/en-US/?user=Entrancee80Upload file to public folder<font size=2><span style="font-family:Times New Roman">Hi there</span></font><br><br>How can I upload a doc file to a public folder <span style="font-size:12pt;font-family:">programmatically</span>?<br><br><font size=2><span style="font-family:Times New Roman">Thanks In Advance</span></font><br>Sat, 05 Apr 2008 07:00:10 Z2009-11-25T23:32:17Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/ca940c2d-747b-4ddb-aac4-af608e59b223http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/ca940c2d-747b-4ddb-aac4-af608e59b223Exchange_buddyhttp://social.technet.microsoft.com/Profile/en-US/?user=Exchange_buddyAny one worked on SynchronizationDid anyone work on synchronization topic of EWS . I wrote some function which pull data from exchange after certain time period and if any appointment created or updated then it catch and save in my database, however i dont know how to handle the delete appointment thing in this code . I tried to find out deleted item from same way but unable to do it. I stuck on this problem from weeks. can anyone help me out on this.Wed, 25 Nov 2009 23:20:00 Z2009-11-25T23:20:01Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1c08e6b0-45ce-4009-81a9-fc81fabc4391http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1c08e6b0-45ce-4009-81a9-fc81fabc4391peter.livseyhttp://social.technet.microsoft.com/Profile/en-US/?user=peter.livseyHow do I access the email body in code?Hi<br/><br/>I am trying to access an exchange mailbox and read the contents of an email.  I'm currently using this code to retrieve the mail message ID and subject, but the FindTitems comment doesn't support returning the message body.<br/><br/>How do I access the message body?<br/><br/>Thanks<br/>Peter<br/><br/> <pre lang="x-c#">using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Exchange.WebServices.Data; using System.Net; namespace EmailTestC2 { class Program { static void Main(string[] args) { ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2007_SP1); // Setting credentials is unnecessary when you connect from a computer that is // logged on to the domain. //service.Credentials = new WebCredentials(&quot;username&quot;, &quot;password&quot;, &quot;domain&quot;); service.Url = new Uri(&quot;https://&lt;SERVERNAME&gt;/EWS/Exchange.asmx&quot;); ItemView view = new ItemView(10); view.OrderBy.Add(ItemSchema.DateTimeReceived, SortDirection.Ascending); view.PropertySet = new PropertySet( BasePropertySet.IdOnly, ItemSchema.Subject, ItemSchema.DateTimeReceived); FindItemsResults&lt;Item&gt; findResults = service.FindItems( WellKnownFolderName.Inbox, new SearchFilter.SearchFilterCollection( LogicalOperator.Or, new SearchFilter.ContainsSubstring(ItemSchema.Subject, &quot;Weather&quot;), new SearchFilter.ContainsSubstring(ItemSchema.Subject, &quot;Warning&quot;)), view); Console.WriteLine(&quot;Total number of items found: &quot; + findResults.TotalCount.ToString()); foreach (Item item in findResults) { // Do something with the item. Console.WriteLine(&quot;ID:&quot; + item.Id.ToString()); Console.WriteLine(&quot;Subject:&quot; + item.Subject.ToString()); } } } } </pre>Fri, 20 Nov 2009 11:37:47 Z2009-11-25T17:55:59Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/529dff4d-78a4-4c31-94e2-a9c7d7b7b75bhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/529dff4d-78a4-4c31-94e2-a9c7d7b7b75bTeeohttp://social.technet.microsoft.com/Profile/en-US/?user=TeeoCustom transport agent generates error Exchange 2007Hello!<br/><br/>I have to write custom transport agent in C# for Exchange 2007 that counts all recipents in all distribution groups, that is sender sending mail (also recursive - counts recipients in a group that is in a group). Exchange 2007 by default takes on group as on recipient, but i have to make transport agent that counts all recipients in a group (Exchange 2003 did that).<br/><br/>I know that microsoft has his best practices, but my company that i am writing this agent doesn't care about it and they want this agent.<br/><br/>The problem is that i am not very good in programming but i manage to get this agent working as expeced, but agent causes this error after seven days of working just fine:<br/><br/>Log Name:      Application<br/>Source:        MSExchangeTransport<br/>Date:          13.11.2009 14:42:14<br/>Event ID:      15007<br/>Task Category: ResourceManager<br/>Level:         Error<br/>Keywords:      Classic<br/>User:          N/A<br/>Computer:      EXCH1.xxxxx.xxx<br/>Description:<br/>The Microsoft Exchange Transport service is rejecting message submissions because the service continues to consume more memory than the configured threshold.<br/><br/>Resource utilization of the following resources exceed the normal level:<br/>Private bytes = 74% [High] [Normal=71% Medium=73% High=75%]<br/>Physical memory load = 93% [limit is 94% before message dehydration occurs.]<br/><br/>Back pressure caused the following components to be disabled:<br/>Inbound mail submission from Hub Transport servers<br/>Inbound mail submission from the Internet<br/>Mail submission from the Pickup directory<br/>Mail submission from the Replay directory<br/>Mail submission from Mailbox servers<br/>Loading of e-mail from the queuing database (if available)<br/><br/>The following resources are in the normal state:<br/>Queue database and disk space (&quot;C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue\mail.que&quot;) = 62% [Normal] [Normal=94% Medium=96% High=98%]<br/>Queue database logging disk space (&quot;C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue\&quot;) = 62% [Normal] [Normal=94% Medium=96% High=98%]<br/>Version buckets = 0 [Normal] [Normal=80 Medium=120 High=200]<br/><br/><br/>Event Xml:<br/>&lt;Event xmlns=&quot;http://schemas.microsoft.com/win/2004/08/events/event&quot;&gt;<br/>  &lt;System&gt;<br/>    &lt;Provider Name=&quot;MSExchangeTransport&quot; /&gt;<br/>    &lt;EventID Qualifiers=&quot;49156&quot;&gt;15007&lt;/EventID&gt;<br/>    &lt;Level&gt;2&lt;/Level&gt;<br/>    &lt;Task&gt;15&lt;/Task&gt;<br/>    &lt;Keywords&gt;0x80000000000000&lt;/Keywords&gt;<br/>    &lt;TimeCreated SystemTime=&quot;2009-11-13T13:42:14.000Z&quot; /&gt;<br/>    &lt;EventRecordID&gt;625871&lt;/EventRecordID&gt;<br/>    &lt;Channel&gt;Application&lt;/Channel&gt;<br/>    &lt;Computer&gt;EXCH1.xxxxx.xxx&lt;/Computer&gt;<br/>    &lt;Security /&gt;<br/>  &lt;/System&gt;<br/>  &lt;EventData&gt;<br/>    &lt;Data&gt;<br/><br/>Resource utilization of the following resources exceed the normal level:<br/>Private bytes = 74% [High] [Normal=71% Medium=73% High=75%]<br/>Physical memory load = 93% [limit is 94% before message dehydration occurs.]<br/><br/>Back pressure caused the following components to be disabled:<br/>Inbound mail submission from Hub Transport servers<br/>Inbound mail submission from the Internet<br/>Mail submission from the Pickup directory<br/>Mail submission from the Replay directory<br/>Mail submission from Mailbox servers<br/>Loading of e-mail from the queuing database (if available)<br/><br/>The following resources are in the normal state:<br/>Queue database and disk space (&quot;C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue\mail.que&quot;) = 62% [Normal] [Normal=94% Medium=96% High=98%]<br/>Queue database logging disk space (&quot;C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue\&quot;) = 62% [Normal] [Normal=94% Medium=96% High=98%]<br/>Version buckets = 0 [Normal] [Normal=80 Medium=120 High=200]<br/><br/>&lt;/Data&gt;<br/>  &lt;/EventData&gt;<br/>&lt;/Event&gt;<br/><br/><br/>I am giving you my code that i know it is not prfect, but if anyone has some time please look at it and tell me why is it comming to memorry leak after running this agent more than seved days. after that we just restart transport service and everything works fine for another 7 days.<br/><br/>Thank you very much.<br/><br/>Code:<br/><br/> <pre lang="x-c#">using System; using System.Collections.Generic; using System.Text; using System.IO; using Microsoft.Exchange.Data.Transport; using Microsoft.Exchange.Data.Transport.Routing; using Microsoft.Exchange.Data.Common; using Microsoft.Exchange.Data.Mime; using Microsoft.Exchange.Data.Globalization; using Microsoft.Exchange.Data.ContentTypes.Tnef; using Microsoft.Exchange.Data.TextConverters; using System.Collections; using System.Diagnostics; using System.Threading; using Microsoft.Exchange.Data.Transport.Email; using Microsoft.Exchange.Data.Transport.Smtp; using System.DirectoryServices; using System.Collections.ObjectModel; using System.Management.Automation; using System.Management.Automation.Runspaces; namespace MaxRecipentsFilter { public sealed class MaxRecipentsFilterAgentFactory : RoutingAgentFactory { public override RoutingAgent CreateAgent(SmtpServer server) { return new MyRoutingAgent(); } } public class MyRoutingAgent : RoutingAgent { public MyRoutingAgent() { this.OnSubmittedMessage += new SubmittedMessageEventHandler(MyRoutingAgent_OnSubmittedMessage); } void MyRoutingAgent_OnSubmittedMessage(SubmittedMessageEventSource source, QueuedMessageEventArgs e) { string sender = e.MailItem.Message.From.NativeAddress; int meja = 0; int nRecipients = 0; string domain = String.Empty; string adminMail = String.Empty; string fileName = &quot;C:\\TransportAgents\\Config_MaxRecipentsFilter.ini&quot;; TextReader textReader = new StreamReader(fileName); string line = textReader.ReadLine(); while (line != null) { if (line.IndexOf('=') &gt; 0) { if (line.Contains(&quot;Domain&quot;)) { domain = line.Substring(line.IndexOf('=') + 1).Trim(); } else if (line.Contains(&quot;MaxRecipents&quot;)) { string temp = line.Substring(line.IndexOf('=') + 1); meja = Convert.ToInt16(temp.Trim()); } else if (line.Contains(&quot;AdminMail&quot;) &amp;&amp; line.Contains(&quot;@&quot;)) { adminMail = line.Substring(line.IndexOf('=') + 1).Trim(); } } line = textReader.ReadLine(); } textReader.Close(); meja = vrniGlobalLimit(domain); if (vrniUserDn(sender, domain)) { sender = e.MailItem.Message.From.DisplayName; int HasValue = vrniAtr(sender, domain); if (HasValue &gt; 0) { meja = HasValue; } int to = e.MailItem.Message.To.Count; int bcc = e.MailItem.Message.Bcc.Count; int cc = e.MailItem.Message.Cc.Count; int z = 0; while (z &lt; to &amp;&amp; to &gt; 0) { nRecipients = GetUsersInGroup(e.MailItem.Message.To[z].DisplayName, domain) + nRecipients; z++; } z = 0; while (z &lt; bcc &amp;&amp; bcc &gt; 0) { nRecipients = GetUsersInGroup(e.MailItem.Message.Bcc[z].DisplayName, domain) + nRecipients; z++; } z = 0; while (z &lt; cc &amp;&amp; cc &gt; 0) { nRecipients = GetUsersInGroup(e.MailItem.Message.Cc[z].DisplayName, domain) + nRecipients; z++; } if (nRecipients &gt; meja) { EmailRecipient ime = new EmailRecipient(e.MailItem.Message.From.DisplayName, e.MailItem.Message.From.SmtpAddress); string emailNaslov = e.MailItem.Message.From.SmtpAddress; e.MailItem.Message.Subject = &quot;[AGENT: Message Rejected!] &quot; + e.MailItem.Message.Subject; e.MailItem.Message.To.Clear(); e.MailItem.Recipients.Clear(); e.MailItem.Message.Bcc.Clear(); e.MailItem.Message.Cc.Clear(); e.MailItem.Message.To.Add(ime); e.MailItem.Recipients.Add(new RoutingAddress(emailNaslov)); e.MailItem.Message.Body.ToString(); Body body = e.MailItem.Message.Body; Stream originalBodyContent = body.GetContentReadStream(); Stream newBodyContent = body.GetContentWriteStream(); Encoding encoding = Charset.GetEncoding(body.CharsetName); TextToText conversion = new TextToText(); conversion.InputEncoding = encoding; conversion.HeaderFooterFormat = HeaderFooterFormat.Text; conversion.Header = &quot;Message was rejected&quot;; conversion.Convert(originalBodyContent, newBodyContent); newBodyContent.Close(); originalBodyContent.Close(); if (adminMail.Contains(&quot;@&quot;)) { e.MailItem.Recipients.Add(new RoutingAddress(adminMail)); } } } } public int GetUsersInGroup(string group, string domain) { string dn = vrniDn(group, domain); SortedList groupMemebers = new SortedList(); SortedList groups = new SortedList(); string sam = &quot;&quot;; string fname = &quot;&quot;; string lname = &quot;&quot;; string active = &quot;&quot;; string samg = &quot;&quot;; string fnameg = &quot;&quot;; int result = 0; DirectoryEntry de = new DirectoryEntry(&quot;LDAP://&quot; + domain); DirectorySearcher ds = new DirectorySearcher(de); DirectorySearcher dsu = new DirectorySearcher(de); try { dsu.Filter = &quot;(&amp;(memberOf=&quot; + dn + &quot;)(objectCategory=Person))&quot;; dsu.PropertiesToLoad.Add(&quot;givenname&quot;); dsu.PropertiesToLoad.Add(&quot;samaccountname&quot;); dsu.PropertiesToLoad.Add(&quot;sn&quot;); dsu.PropertiesToLoad.Add(&quot;useraccountcontrol&quot;); foreach (SearchResult sru in dsu.FindAll()) { try { sam = sru.Properties[&quot;samaccountname&quot;][0].ToString(); fname = sru.Properties[&quot;givenname&quot;][0].ToString(); lname = sru.Properties[&quot;sn&quot;][0].ToString(); active = sru.Properties[&quot;useraccountcontrol&quot;][0].ToString(); } catch (Exception e) { } // don't grab disabled users if (active.ToString() != &quot;514&quot;) { groupMemebers.Add(sam.ToString(), (fname.ToString() + &quot; &quot; + lname.ToString())); } } result = groupMemebers.Count; groupMemebers.Clear(); ds.Filter = &quot;(&amp;(memberOf=&quot; + dn + &quot;)(objectCategory=Group))&quot;; ds.PropertiesToLoad.Add(&quot;givenname&quot;); ds.PropertiesToLoad.Add(&quot;samaccountname&quot;); foreach (SearchResult sr in ds.FindAll()) { try { samg = sr.Properties[&quot;samaccountname&quot;][0].ToString(); fnameg = sr.Properties[&quot;givenname&quot;][0].ToString(); } catch (Exception e) { } groups.Add(samg.ToString(), (fnameg.ToString())); } ds.Dispose(); dsu.Dispose(); de.Close(); if (groups.Count &gt; 0) { foreach (string Mykey in groups.Keys) { result = result + GetUsersInGroup(Mykey, domain); } } } catch (Exception z) { } groups.Clear(); if (result == 0) { return 1; } else { return result; } } private string vrniDn(string group, string domain) { string dn = &quot;&quot;; DirectoryEntry entry = new DirectoryEntry(&quot;LDAP://&quot; + domain); DirectorySearcher searcher = new DirectorySearcher(entry, &quot;(objectClass=group)&quot;); searcher.Filter = &quot;(DisplayName=&quot; + group + &quot;)&quot;; searcher.PropertiesToLoad.Add(&quot;distinguishedName&quot;); foreach (SearchResult sr in searcher.FindAll()) { try { dn = sr.Properties[&quot;distinguishedName&quot;][0].ToString(); } catch (Exception e) { } } searcher.Dispose(); entry.Close(); return dn; } private bool vrniUserDn(string user, string domain) { bool obstaja = false; string dn = &quot;gani&quot;; try { DirectoryEntry entry = new DirectoryEntry(&quot;LDAP://&quot; + domain); DirectorySearcher searcher = new DirectorySearcher(entry, &quot;(objectClass=user)&quot;); searcher.Filter = &quot;(mail=&quot; + user + &quot;)&quot;; searcher.PropertiesToLoad.Add(&quot;distinguishedName&quot;); foreach (SearchResult sr in searcher.FindAll()) { try { dn = sr.Properties[&quot;distinguishedName&quot;][0].ToString(); } catch (Exception e) { } } searcher.Dispose(); entry.Close(); if (dn.CompareTo(&quot;gani&quot;) != 0) { obstaja = true; } } catch (Exception t) { } return obstaja; } private int vrniAtr(string user, string domain) { int atr = 0; string temp = &quot;0&quot;; DirectoryEntry entry = new DirectoryEntry(&quot;LDAP://&quot; + domain); DirectorySearcher searcher = new DirectorySearcher(entry, &quot;(objectClass=user)&quot;); searcher.Filter = &quot;(DisplayName=&quot; + user + &quot;)&quot;; searcher.PropertiesToLoad.Add(&quot;msExchRecipLimit&quot;); foreach (SearchResult sr in searcher.FindAll()) { try { temp = sr.Properties[&quot;msExchRecipLimit&quot;][0].ToString(); } catch (Exception e) { } } searcher.Dispose(); entry.Close(); if (temp.Length &gt; 0) { atr = Convert.ToInt16(temp); } return atr; } private int vrniGlobalLimit(string domain) { string globalLimit = &quot;0&quot;; DirectoryEntry entry = new DirectoryEntry(&quot;LDAP://CN=Microsoft Exchange,CN=Services,CN=Configuration,&quot; + domain); DirectorySearcher searcher = new DirectorySearcher(entry, &quot;(objectClass=msExchMessageDeliveryConfig)&quot;); searcher.Filter = &quot;(cn=Message Delivery)&quot;; searcher.PropertiesToLoad.Add(&quot;msExchRecipLimit&quot;); foreach (SearchResult sr in searcher.FindAll()) { try { globalLimit = sr.Properties[&quot;msExchRecipLimit&quot;][0].ToString(); } catch (Exception e) { } } searcher.Dispose(); entry.Close(); return Convert.ToInt16(globalLimit); } } } </pre>Wed, 25 Nov 2009 15:02:37 Z2009-11-25T15:02:38Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/f6b6f794-054c-4220-9adb-95054a683f36http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/f6b6f794-054c-4220-9adb-95054a683f36SAK80http://social.technet.microsoft.com/Profile/en-US/?user=SAK80Remove Digital signature/Encryption from outlook 2003 mailsWe are using digital signature and encryption ( certificate) method in our organisation.<br/><br/>There is a senario where user wants to decrypt the mails and save to teamsite( sharepoint) so that other users can open the mails.Is it possible to decrypt a mail using a program or addin button from outlook  before saving to sharepoint?<br/><br/>( right now user can save mails to sharepoint in encrypted format , but only the particular user can view the mail.)<br/><br/>SAK<br/>Wed, 25 Nov 2009 09:19:43 Z2009-11-25T09:19:44Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/14cc693c-b469-45a9-8888-b6caecd4a8bbhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/14cc693c-b469-45a9-8888-b6caecd4a8bbjravnhttp://social.technet.microsoft.com/Profile/en-US/?user=jravnVB.net or C# - Query Exchange 2010 informations<p>Hello</p> <p>The code (VB 2008) below is working when it's executed local on the exchange 2010 server<br/><br/>Dim rsConfig As RunspaceConfiguration = RunspaceConfiguration.Create()<br/>Dim snapInException As PSSnapInException = Nothing<br/>Dim info As PSSnapInInfo = rsConfig.AddPSSnapIn(&quot;Microsoft.Exchange.Management.PowerShell.E2010&quot;, snapInException)</p> <p>Dim myRunSpace As Runspace = RunspaceFactory.CreateRunspace(rsConfig)<br/>Dim pipeLine As Pipeline = myRunSpace.CreatePipeline()<br/>Dim ri As New RunspaceInvoke(myRunSpace)´<br/><br/>myRunSpace.Open()</p> <p>Dim commandResults As Collection(Of PSObject)<br/>commandResults = ri.Invoke(&quot;Get-Recipient -ResultSize unlimited&quot;)</p> <p>When i try to execute the same code from a Windows 7 x64 + ESM 2010, it give me a unhandled exception with the error code below.<br/>&quot;The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security&quot;<br/><br/>I have read the link below, but im having a hard time to fit that sample code into my code logic.<br/><a href="http://msexchangeteam.com/archive/2009/11/02/453016.aspx">http://msexchangeteam.com/archive/2009/11/02/453016.aspx</a></p> <p>Is there anyone who is having a &quot;remote execution sample&quot; without hardcoded username and password, for the exchange 2010 platform.</p> <p>Thanks,</p> <p>/Jesper</p>Mon, 23 Nov 2009 09:51:12 Z2009-11-25T08:21:42Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/0804fb96-2e8f-4efb-884d-da0a078c104ahttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/0804fb96-2e8f-4efb-884d-da0a078c104adgodbeyhttp://social.technet.microsoft.com/Profile/en-US/?user=dgodbeyGet calendar event based on UIDHow do you get an event based on UID? I imagine you would use a restriction filter, and I've fumbled about some trying to do this, but I've yet to find a way. Can someone please help?<br/> Thanks,<br/> DaveTue, 16 Jun 2009 19:12:23 Z2009-11-25T06:33:11Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/328df6a1-2bc8-49c4-bc6d-bb0c848f5f5dhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/328df6a1-2bc8-49c4-bc6d-bb0c848f5f5dAsh M.http://social.technet.microsoft.com/Profile/en-US/?user=Ash%20M.Push Notification Web Service on SSL?<p>If the Push Notification Client Web Serice is configured with SSL certificate, how does Exchange Server handles SSL certificates?</p> <p>Are there any limitations for this requirement?</p> <p>When I tried with an SSL certificate which is applied on my Push Notification Client, I could not get any notification from Exchange Server for my Web Service. But it works perfectly fine when I remove the certificate.</p> <p>Thanks,</p> <p>Ash</p>Tue, 24 Nov 2009 07:05:29 Z2009-11-25T05:07:50Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/82fbe44d-bb7b-4010-a3ea-abce2089e08ahttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/82fbe44d-bb7b-4010-a3ea-abce2089e08aJamie Leehttp://social.technet.microsoft.com/Profile/en-US/?user=Jamie%20LeeEWS Push Notification questionI have several questions about Push Notification.<br><br>1.  If I need to keep track of 1000 users' inbox, do I need to create 1000 bindings?  What's the Exchange Server's limit in bindings?<br><br>2.  The Push Notification's &quot;StatusFrequency&quot; is an integer, does that mean the fastest notification I get is every minute?<br><br>3.  After an event is received, what do we send back to the Exchange Server?<br><br>4.  When we tear down the application, do we need to unsubscribe like the Pull Notification?<br><br>5.  In the sample code below, we know what the ItemId is, and we probably need to call GetItem to find out what the item is.  But How do we know if the item is created, deleted, or new?  <br><br>    // Access event information for create, delete, or new mail events.<br>    public static void AccessCreateDeleteNewMailEvent(BaseObjectChangedEventType bocet)<br>    { <br>        // Get the watermark for the event.<br>        string watermark = bocet.Watermark;<br><br>        // Get the timestamp for the event.<br>        DateTime timestamp = bocet.TimeStamp;<br><br>        // Get the parent folder identifier.<br>        FolderIdType parentFolderId = bocet.ParentFolderId;<br><br>        // Get either the folder or item identifier for a <br>        // create/delete/new mail event.<br>        if (bocet.Item is ItemIdType)<br>        {<br>            // Get the item identifier.<br>            ItemIdType itemId = bocet.Item as ItemIdType;<br>        }<br>        else<br>        { <br>            // Get the folder identifier.<br>            FolderIdType folderId = bocet.Item as FolderIdType;<br>        }<br>    }<br><br><br>Thanks in advance,<br>Fri, 07 Dec 2007 00:57:02 Z2009-11-25T00:27:50Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/a4f82548-741a-45c5-a766-32a8a04dfc97http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/a4f82548-741a-45c5-a766-32a8a04dfc97Narendran4887http://social.technet.microsoft.com/Profile/en-US/?user=Narendran4887Message tracking logCan we able to retrieve data frm exchange message tracking log using WMI and WebDAV?<br/><br/>if so kindly provide me a sample code!!!!!!!!!!!!!!!!!!!!!!!!<br/><br/>And which one can be used to retrieve data frm message tracking log of exchange 2003 , 2007 and 2010?Tue, 24 Nov 2009 16:55:59 Z2009-11-24T22:26:38Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3222bcc0-1121-4ffa-8c77-a571fe7a27c3http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3222bcc0-1121-4ffa-8c77-a571fe7a27c3DEX22http://social.technet.microsoft.com/Profile/en-US/?user=DEX22Create contact without email address EWS Managed API 1.0Hello all,<br/><br/>When I try to create contact without email address, I get this error:<br/><br/><strong>The request failed schema validation: The element 'EmailAddresses' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has incomplete content. List of possible elements expected: 'Entry' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.<br/></strong><br/>Having an empty string as the address causes the 'ErrorCorruptData' error to be thrown. Also updates fails and cause an error with the following message:<br/><br/><strong>An object within a change description must contain one and only one property to modify<br/><br/></strong>How does one create contacts with no email addresses? <br/>The target server is Exchange Server 2007 SP2<br/>Any help will be appreciated <br/><br/>ThanksTue, 17 Nov 2009 08:15:57 Z2009-11-24T20:22:27Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/62571e14-597d-48b5-8e7c-6f3975b5fa06http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/62571e14-597d-48b5-8e7c-6f3975b5fa06roomailhttp://social.technet.microsoft.com/Profile/en-US/?user=roomailNeed help with creating an Exchange 2007 Powershell script to help lower level account creation admins<p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-size:x-small"><span style="font-family:Calibri;font-size:small">Hi All,<br/><br/>I would like to thank anyone who reads and contributes to this post.<br/><br/>I'm looking for a way to use Exchange 2007 Powershell scripting to give admins in our other offices the ability to add new users with mailboxes, without giving them access to our centralized Exchange 2007 servers. </span><span style="font-family:Calibri;font-size:small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><br/><span style="font-size:x-small">Here's a rough layout of how I think it should work:</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">Domain.local</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                &gt; New User and Mailbox</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                                                                &gt;New York</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                                                                &gt;Los Angeles</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                                                                &gt;Chicago</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                &gt; User Accounts</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                                                &gt;New York</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                                                &gt;Los Angeles</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">                                                                &gt;Chicago</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">1. Create an OU in AD called &quot;New User and Mailbox&quot;</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">2. Create sub OUs for each office</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">3. Give admins in each office, rights to create user accounts in their respective office's OU</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">4. Create a script that will monitor these OUs on a schedule </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">The script will have to do the following as well:</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">5. If a user account is created in one of these office OUs, check the three Exchange servers to see which of them has the smallest database</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">6. Once the server with the database is found, create the mailbox in that database</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">7. After the mailbox is attached to the new user account, the script will then move the user object into the correct OU - for example User Accounts &gt; New York, so that the correct GPOs can apply to the new  user.</span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small"> </span></span></p> <p class=MsoNormal style="margin:0cm 0cm 0pt"><span style="font-family:Calibri;font-size:small"><span style="font-size:x-small">I'm not good a Powershell scripting myself, but I know this can be done.  Please steer me in the right direction - I would greatly appreciate it.<br/><br/>Cheers.</span></span></p>Tue, 24 Nov 2009 18:37:17 Z2009-11-24T18:37:18Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/b2c695ce-935a-43ba-b258-7ce3cf296d31http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/b2c695ce-935a-43ba-b258-7ce3cf296d31KennethArenhttp://social.technet.microsoft.com/Profile/en-US/?user=KennethArenCreate a Calendar Item with delegate access using PowershellHello,<br/> <br/> I am currently writing a Powershell script to synchronize every 10 minutes a calendar from a mysql database, and the outlook calendars of my colleagues. For this, I'm running my script with an account that has every rights on every mailboxes. It uses a soap request of this form :<br/> <br/> <pre lang=x-xml>&lt;soap:Envelope xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot; xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot;&gt; &lt;soap:Body&gt; &lt;CreateItem xmlns=&quot;http://schemas.microsoft.com/exchange/services/2006/messages&quot; xmlns:t=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot; SendMeetingInvitations=&quot;SendToAllAndSaveCopy&quot; &gt; &lt;SavedItemFolderId&gt; &lt;t:DistinguishedFolderId Id=&quot;calendar&quot;/&gt; &lt;/SavedItemFolderId&gt; &lt;Items&gt; &lt;t:CalendarItem xmlns=&quot;http://schemas.microsoft.com/exchange/services/2006/types&quot;&gt; &lt;Subject&gt;Planning Meeting&lt;/Subject&gt; &lt;Body BodyType=&quot;Text&quot;&gt;Plan the agenda for next week's meeting.&lt;/Body&gt; &lt;ReminderIsSet&gt;true&lt;/ReminderIsSet&gt; &lt;ReminderMinutesBeforeStart&gt;60&lt;/ReminderMinutesBeforeStart&gt; &lt;Start&gt;2006-11-02T14:00:00&lt;/Start&gt; &lt;End&gt;2006-11-02T15:00:00&lt;/End&gt; &lt;IsAllDayEvent&gt;false&lt;/IsAllDayEvent&gt; &lt;LegacyFreeBusyStatus&gt;Busy&lt;/LegacyFreeBusyStatus&gt; &lt;Location&gt;Conference Room 721&lt;/Location&gt; &lt;/t:CalendarItem&gt; &lt;/Items&gt; &lt;/CreateItem&gt; &lt;/soap:Body&gt; &lt;/soap:Envelope&gt;</pre> <br/> The problem is : how do I change the organizer of the meeting to the one of my colleagues which has this meeting, so that he doesn't receive a useless mail from my superuser account every time? Is there any way to do this via powershell scripting?<br/> <br/> http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3183b77b-b190-4e42-8d12-2f1e47317369<br/> <br/> After reading this post, I tried to apply these methods to my soap request, but it seems that the SavedItemFolderId is also read-only...<br/> <br/> So here is my question : is there any chance I can do this task using exclusively PowerShell? (and not VB, for example)<br/> <br/> Thank you for reading,<br/> <br/> KennyFri, 20 Nov 2009 15:21:44 Z2009-11-24T14:41:12Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/30ee1762-1b7a-4e69-a2d4-be3589ec2d6chttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/30ee1762-1b7a-4e69-a2d4-be3589ec2d6cprademakhttp://social.technet.microsoft.com/Profile/en-US/?user=prademakHow to retrieve the follow-up flag property of a Message<p>Hello,<br/><br/>Does anyone know whether there is a way (and if so, how) to retrieve the Follow-up flag property for an e-mail message using Exchange Web Services? <br/><br/>This flag can be set in MS Outlook (at least, in my version, 2007), I'm not sure whether it is stored in Exchange. <br/>(however, from a small test with a shared mailbox it does seem like it is stored centrally, since changes to the follow-up flags are visible to other Outlook users)<br/><br/>I've searched google, this forum, and the exchange documentation, but I didn't manage to find anything.<br/></p>Tue, 24 Nov 2009 08:25:44 Z2009-11-24T11:48:28Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/7f2059e6-28a2-43c8-a147-aa4eb8d3e34ehttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/7f2059e6-28a2-43c8-a147-aa4eb8d3e34eBilly NW Londonhttp://social.technet.microsoft.com/Profile/en-US/?user=Billy%20NW%20LondonCDO message with custom property<div class=uwePostText>I have some code that sends emails using CDO from a Microsoft Access front-end application running on Windows XP Pro.<br/>What I am trying to do is add a custom property so that I can trace the <br/>email in an exchange event sink AND from the Outlook model.<br/>If I add the userproperty in Outlook, then it's visible in CDO, but this <br/>email will be created in CDO so I don't know how, or even if, it can be done.<br/>Based on my code below, if I wanted a property called &quot;InternalRef&quot;, what <br/>would I need to do?<br/><br/>thanks<br/><br/>Set ObjMail=CreateObject(&quot;CDO.Message&quot;)<br/>Set ObjMail.Configuration=GetSMTPServerConfig()<br/><br/>Set objFieldsColl = ObjMail.Fields<br/>Set Prop1 = objFieldsColl.Add( _<br/>                     Name:=&quot;InternalRef&quot;, _<br/>                     Class:=vbString, _<br/>                     Value:=InternalRef)<br/><br/>The last line throws up an error:<br/>&quot;Object doesn't support this property or method&quot;<br/><br/>This is only with the Add method of the fields collection.<br/>The count and item property work, so the collection variable works.<br/><br/>Although Outlook is installed on the machine, I'm bypassing it and using CDO <br/>directly.<br/>Have they blocked the Add method for security?<br/>I need this code to run on all XP workstations that are part of our SBS2003 domain.<br/><br/>Thanks<br/></div>Sun, 22 Nov 2009 18:52:00 Z2009-11-24T12:01:43Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3a5de2bb-00b4-4d61-a173-48261426215dhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3a5de2bb-00b4-4d61-a173-48261426215dBrian AAAhttp://social.technet.microsoft.com/Profile/en-US/?user=Brian%20AAAGet displayname or other account properties of current EWS session?<p>So I have a valid session and can read/create items, using:<br/><br/>service.Credentials = new WebCredentials(strUsername, strPassword, strDomain);</p> <p>service.AutodiscoverUrl(strUsername, ValidateRedirectionUrlCallback);<br/><br/>How can I retrieve the currently authenticated user's Display name?<br/><br/>ie MessageBox.show( &quot;You are currently signed in as: &quot; + userDisplayName )  ??<br/><br/>Thanks, <br/><br/>Brian</p>Mon, 23 Nov 2009 20:52:27 Z2009-11-24T05:01:52Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/2fe964bc-07b4-41ee-b006-95d96629e532http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/2fe964bc-07b4-41ee-b006-95d96629e532AquaGuyCWChttp://social.technet.microsoft.com/Profile/en-US/?user=AquaGuyCWCJournalling<p>I now have a small application that allows my call centre users to see the status of various appointments in the online calendar and to mark them as booked or free. My boss is happy ish! This morning though he asked me if any options exist to journal when appointments are create/updated or deleted in Exchange Online. The client will handle if a user try's to update the status of an appointment if it has been modified or deleted, but we would like a central journalling method.<br/><br/>Can anyone advise me if this is possible? and If so point me in the right direction?<br/><br/>Thanks<br/></p>Mon, 23 Nov 2009 12:31:14 Z2009-11-23T12:31:15Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/123c3f75-8fd8-4644-a78e-81763260ca7chttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/123c3f75-8fd8-4644-a78e-81763260ca7cSandro Rudinhttp://social.technet.microsoft.com/Profile/en-US/?user=Sandro%20RudinEWS: Get immediate change notificationWe're developing a reservation system that needs to be sync with the users meeting requests in outlook.<br/><br/>Now I'm trying to set up a push notification. I'd like to get notified immediately if certain events have occurred OR after 30min if none has. But my tests show that I only get notified after 30min (the frequency I can configure) which means that it can take up to 30min until our system will react to a change on the exchange server. Setting a very low frequency is not an option as we plan to observe about 50'000 folders. I'm getting the impression that push notifications do not exactly provide what we are looking for... I don't care whether the notification is sync or async but I need it to be immediately - is there a way to achieve this with push notifications?<br/><br/>We have solved this problem already on exchange2003 using eventsinks but were planning to get rid of those and use push notifications instead. Are eventsinks the better option? And what is the difference to an storesink? Are there other means to this goal?Mon, 16 Nov 2009 17:32:32 Z2009-11-23T10:57:38Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/024405ef-19bf-4ca0-8aa2-a340cf98c824http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/024405ef-19bf-4ca0-8aa2-a340cf98c824eyalpzhttp://social.technet.microsoft.com/Profile/en-US/?user=eyalpzHow to connect with EWS API to microsoft mail (BPOS)Hi,<br/>I'm trying to connect to microsoft mail (at the cloud) using URL: <a href="https://mail.emea.microsoftonline.com/owa/">https://mail.emea.microsoftonline.com/owa/</a><br/>The EWS API cann'y Auto discover URL, and i' can't craete a basic connection.<br/><br/>How can i use the EWS API for this kind of solution?<br/><br/>Best Regards,<br/>Eyal<br/>Sun, 22 Nov 2009 16:30:24 Z2009-11-22T16:30:25Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1e48a968-a8eb-4387-ace0-38092a467605http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1e48a968-a8eb-4387-ace0-38092a467605Jignesh Desaihttp://social.technet.microsoft.com/Profile/en-US/?user=Jignesh%20DesaiExchange Web Service 1.0 - Basic 5 line Code Unable to connectHello Friends,<br/><br/>I am relatively new to EWS. So I need guidance.<br/><span style="text-decoration:underline">Environment</span>.<br/>OS: XP with SP2<br/>VS.NET 2008<br/>EWS <br/><br/>Have written very simple code, which throw below exception<br/><br/>             AutoDiscoverLocalException: The AutoDiscover Service could not be located.<br/><br/><br/><span style="text-decoration:underline">Code Looks like Below</span>.<br/> <div><span style="font-size:x-small;color:#2b91af">ExchangeService</span><span style="font-size:x-small"> xService = </span><span style="font-size:x-small;color:#0000ff">new</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#2b91af">ExchangeService</span><span style="font-size:x-small">();</span></div> <span style="font-size:x-small"><span style="font-size:x-small"> <div>xService.UseDefaultCredentials =</div> </span></span> <div><span style="font-size:x-small;color:#0000ff">false</span><span style="font-size:x-small">;<span style="font-size:x-small"> <div>xService.Credentials =</div> </span></span></div> <div><span style="font-size:x-small;color:#0000ff">new</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#2b91af">NetworkCredential</span><span style="font-size:x-small">(</span><span style="font-size:x-small;color:#a31515">&quot;test1&quot;</span><span style="font-size:x-small">, </span><span style="font-size:x-small;color:#a31515">&quot;xxxxx&quot;</span><span style="font-size:x-small">, </span><span style="font-size:x-small;color:#a31515">&quot;xxxxx.com&quot;</span><span style="font-size:x-small">);<span style="font-size:x-small"> <div><strong><br/>xService.AutodiscoverUrl(</strong></div> </span></span></div> <div><span style="font-size:x-small;color:#a31515"><strong>&quot;test1@xxxxx.com&quot;</strong></span><span style="font-size:x-small"><strong>);<br/></strong></span></div> <div><span style="font-size:x-small;color:#2b91af"><br/>FindItemsResults</span><span style="font-size:x-small">&lt;</span><span style="font-size:x-small;color:#2b91af">Item</span><span style="font-size:x-small">&gt; findResults = xService.FindItems(</span><span style="font-size:x-small;color:#2b91af">WellKnownFolderName</span><span style="font-size:x-small">.Inbox, </span><span style="font-size:x-small;color:#0000ff">new</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#2b91af">ItemView</span><span style="font-size:x-small">(100));</span></div> <div><span style="font-size:x-small;color:#2b91af">MessageBox</span><span style="font-size:x-small">.Show(findResults.Count().ToString());</span></div> <br/><br/>---------------------------------------------------------------------------------------------------------------<br/>I then tried to manually set  URL Property and i got a different Error Message.<br/><br/><span style="text-decoration:underline">CODE</span>:<br/> <div><span style="font-size:x-small;color:#2b91af">ExchangeService</span><span style="font-size:x-small"> xService = </span><span style="font-size:x-small;color:#0000ff">new</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#2b91af">ExchangeService</span><span style="font-size:x-small">();</span></div> <div><span style="font-size:x-small;color:#008000"><strong>xService.Url = new Uri(@&quot;https://mail.xxxxxxx.com/EWS/Exchange.asmx&quot;);</strong></span></div> <span style="font-size:x-small"><span style="font-size:x-small"> <div>xService.UseDefaultCredentials =</div> </span></span> <div><span style="font-size:x-small;color:#0000ff">false</span><span style="font-size:x-small">;<span style="font-size:x-small"> <div>xService.Credentials =</div> </span></span></div> <div><span style="font-size:x-small;color:#0000ff">new</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#2b91af">NetworkCredential</span><span style="font-size:x-small">(</span><span style="font-size:x-small;color:#a31515">&quot;test1&quot;</span><span style="font-size:x-small">, </span><span style="font-size:x-small;color:#a31515">&quot;xxxxx&quot;</span><span style="font-size:x-small">, </span><span style="font-size:x-small;color:#a31515">&quot;xxxxx.com&quot;</span><span style="font-size:x-small">);</span></div> <div><strong><span style="font-size:x-small;color:#2b91af">FindItemsResults</span><span style="font-size:x-small">&lt;</span><span style="font-size:x-small;color:#2b91af">Item</span><span style="font-size:x-small">&gt; findResults = xService.FindItems(</span><span style="font-size:x-small;color:#2b91af">WellKnownFolderName</span><span style="font-size:x-small">.Inbox, </span><span style="font-size:x-small;color:#0000ff">new</span><span style="font-size:x-small"> </span><span style="font-size:x-small;color:#2b91af">ItemView</span></strong><span style="font-size:x-small"><strong>(100));</strong></span></div> <div><strong><span style="font-size:x-small;color:#2b91af">MessageBox</span><span style="font-size:x-small">.Show(findResults.Count().ToString());</span></strong><br/><br/><strong><span style="text-decoration:underline">ERROR Message</span></strong>:<br/><br/>Microsoft.Exchange.WebServices.Data.ServiceRequestException was unhandled<br/>  Message=&quot;Request failed. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.&quot;<br/>  Source=&quot;Microsoft.Exchange.WebServices&quot;<br/>  StackTrace:<br/>       at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.InternalExecute()<br/>       at Microsoft.Exchange.WebServices.Data.MultiResponseServiceRequest`1.Execute()<br/>       at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems[TItem](IEnumerable`1 parentFolderIds, SearchFilter searchFilter, String queryString, ViewBase view, Grouping groupBy, ServiceErrorHandling errorHandlingMode)<br/>       at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems(FolderId parentFolderId, SearchFilter searchFilter, ItemView view)<br/>       at Microsoft.Exchange.WebServices.Data.ExchangeService.FindItems(WellKnownFolderName parentFolderName, ItemView view)<br/>       at WindowsFormsApplication1.Form1.button1_Click(Object sender, EventArgs e) in C:\Temp\Development\Tests\WindowsFormsApplication1\WindowsFormsApplication1\Form1.cs:line 40<br/>       at System.Windows.Forms.Control.OnClick(EventArgs e)<br/>       at System.Windows.Forms.Button.OnClick(EventArgs e)<br/>       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)<br/>       at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)<br/>       at System.Windows.Forms.Control.WndProc(Message&amp; m)<br/>       at System.Windows.Forms.ButtonBase.WndProc(Message&amp; m)<br/>       at System.Windows.Forms.Button.WndProc(Message&amp; m)<br/>       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<br/>       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<br/>       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)<br/>       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp; msg)<br/>       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)<br/>       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)<br/>       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)<br/>       at System.Windows.Forms.Application.Run(Form mainForm)<br/>       at WindowsFormsApplication1.Program.Main() in C:\Temp\Development\Tests\WindowsFormsApplication1\WindowsFormsApplication1\Program.cs:line 18<br/>       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)<br/>       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)<br/>       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<br/>       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)<br/>       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br/>       at System.Threading.ThreadHelper.ThreadStart()<br/>  InnerException: System.Net.WebException<br/>       Message=&quot;The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.&quot;<br/>       Source=&quot;System&quot;<br/>       StackTrace:<br/>            at System.Net.HttpWebRequest.GetResponse()<br/>            at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.Emit()<br/>            at Microsoft.Exchange.WebServices.Data.ServiceRequestBase.InternalExecute()<br/>       InnerException: System.Security.Authentication.AuthenticationException<br/>            Message=&quot;The remote certificate is invalid according to the validation procedure.&quot;<br/>            Source=&quot;System&quot;<br/>            StackTrace:<br/>                 at System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception)<br/>                 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)<br/>                 at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)<br/>                 at System.Net.TlsStream.CallProcessAuthentication(Object state)<br/>                 at System.Threading.ExecutionContext.runTryCode(Object userData)<br/>                 at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)<br/>                 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)<br/>                 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<br/>                 at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)<br/>                 at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)<br/>                 at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)<br/>                 at System.Net.ConnectStream.WriteHeaders(Boolean async)<br/>            InnerException: <br/></div>Sat, 21 Nov 2009 03:25:45 Z2009-11-21T16:28:49Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/c7653807-fda1-4a31-ab97-3f8aa9b1d51bhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/c7653807-fda1-4a31-ab97-3f8aa9b1d51bSAK80http://social.technet.microsoft.com/Profile/en-US/?user=SAK80\root\MicrosoftExchangeV2 ..WMI is not working in Exchange 2007<p>Hi <br/><br/>Our company is just migrated from exchange 2003 to 2007.We were using lot of vb script every week to fetch mailbox details, now it is no longer working with exchange 2007.( WMI namespace will not work against ex2007) Could someone help to convert to powershell or suggest some other way to fetch the same information?<br/><br/>old script has given below:- <br/><br/>'=============================================================<br/>' Purpose:   Display each Exchange_Mailbox found for Exchange server,<br/>'            and show all properties on the Exchange_Mailbox<br/>'            objects<br/>' Change:    cComputerName [string] the computer to access<br/>' Output:    Displays the name of each Exchange_Mailbox and properties<br/>'===============================================================</p> <p>Dim cComputerName<br/>Dim arrComputers<br/>Dim i<br/>Const cWMINameSpace = &quot;root/MicrosoftExchangeV2&quot;<br/>Const cWMIInstance = &quot;Exchange_Mailbox&quot;</p> <p>Dim strWinMgmts  ' Connection string for WMI<br/>Dim objWMIExchange ' Exchange Namespace WMI object<br/>Dim listExchange_Mailboxs ' ExchangeLogons collection<br/>Dim objExchange_Mailbox  ' A single ExchangeLogon WMI object</p> <p>Set objConnection = CreateObject(&quot;ADODB.Connection&quot;)<br/>objConnection.Open &quot;Provider=ADsDSOObject;&quot;<br/> <br/>Set objCommand = CreateObject(&quot;ADODB.Command&quot;)<br/>objCommand.ActiveConnection = objConnection<br/> <br/>'Starter WMI<br/>arrComputers = Array(&quot;st-excl21&quot;)</p> <p>' Legge inn dato for når jobben er kjørt<br/>Wscript.Echo &quot;Date: &quot; &amp; Now</p> <p>For i = 0 to UBound(arrComputers)</p> <p>    'Assign computer name<br/>    cComputerName = arrComputers(i)<br/>    <br/>    'Write report header<br/>    Wscript.Echo &quot;Server Name: &quot; &amp; cComputerName</p> <p>    'Connect to computer<br/>    'strWinMgmts = &quot;winmgmts:{impersonationLevel=impersonate}!//&quot; &amp; cComputerName &amp; &quot;/&quot; &amp; cWMINameSpace<br/>    'Set objWMIExchange =  GetObject(strWinMgmts)<br/>    On Error Resume Next<br/>    Set objWMIExchange = GetObject(&quot;winmgmts:\\&quot; &amp; cComputerName &amp; &quot;\root\MicrosoftExchangeV2&quot;)</p> <p>    'Verify we were able to correctly set the object.<br/>    If Err.Number &lt;&gt; 0 Then<br/>        Wscript.Echo Err.Description<br/>        WScript.Echo &quot;ERROR: Unable to connect to the WMI namespace.&quot;<br/>        On Error Goto 0<br/>    Else<br/>        On Error Goto 0<br/>        'The Resources that currently exist appear as a list of Exchange_Mailbox instances in the Exchange namespace.<br/>        Set listExchange_Mailboxs = objWMIExchange.InstancesOf(cWMIInstance)<br/>        'Were any Exchange_Mailbox Instances returned?<br/>        wscript.echo listExchange_Mailboxs.count<br/>        If (listExchange_Mailboxs.count &gt; 0) Then            <br/>            'Write column headers<br/>            Wscript.Echo &quot;EmployeeID;Size;ServerName;SAMAccount;Department;MailboxDisplayName;TotalItems;StoreName;LastLoggedOnUserAccount;LastLogoffTime;LastLogonTime&quot;<br/>            'Iterate through the list of Exchange_Mailbox objects.<br/>            For Each objExchange_Mailbox in listExchange_Mailboxs<br/>                'sAMAccount<br/>                strUserName = right(objExchange_Mailbox.LegacyDN,len(objExchange_Mailbox.LegacyDN) - instrRev(objExchange_Mailbox.LegacyDN,&quot;=&quot;))<br/>                'Department</p> <p> objCommand.CommandText = &quot;&lt;<a>LDAP://dc=statoil,dc=net&gt;;(&amp;(objectCategory=User</a>)&quot; &amp; &quot;(samAccountName=&quot; &amp; strUserName &amp; &quot;));department,employeeid;subtree&quot;<br/> Set objRecordSet = objCommand.Execute</p> <p> If objRecordset.RecordCount = 0 Then<br/>      department=&quot;null&quot;<br/>      employeeid=&quot;null&quot;<br/>     Else<br/>        department=objRecordSet(&quot;department&quot;)<br/>        employeeid=objRecordSet(&quot;employeeid&quot;)<br/> End If<br/> <br/> <br/> If isNull(employeeID) then<br/> employeeID=&quot;CommonMailbox&quot;<br/> department=&quot;*&quot;<br/> End If</p> <p> If isNull(department) then<br/> department=&quot;*&quot;<br/> End If</p> <p> LastLoggedOnUser=objExchange_Mailbox.LastLoggedOnUserAccount<br/> If isNull(LastLoggedOnUser) then<br/> LastLoggedOnUser=&quot;*&quot;<br/> End If</p> <p> LastLogOff=objExchange_Mailbox.LastLogoffTime<br/> If isNull(LastLogOff) then<br/> LastLogOff=&quot;*&quot;<br/> End If</p> <p> LastLogon=objExchange_Mailbox.LastLogonTime<br/> If isNull(LastLogon) then<br/> LastLogon=&quot;*&quot;<br/> End If</p> <p> <br/>                'Write properties<br/>                Wscript.Echo employeeID &amp; &quot;;&quot; &amp; _<br/>                        objExchange_Mailbox.Size &amp; &quot;;&quot; &amp; _<br/>                        objExchange_Mailbox.ServerName &amp; &quot;;&quot; &amp; _<br/>                        strUserName &amp; &quot;;&quot; &amp; _<br/>                        department &amp; &quot;;&quot; &amp; _<br/>                        objExchange_Mailbox.MailboxDisplayName &amp; &quot;;&quot; &amp; _<br/>                        objExchange_Mailbox.TotalItems &amp; &quot;;&quot; &amp; _<br/>                        objExchange_Mailbox.StoreName &amp; &quot;;&quot; &amp; _<br/>                        LastLoggedOnUser &amp; &quot;;&quot; &amp; _<br/>                        LastLogOff &amp; &quot;;&quot; &amp; _<br/>                        LastLogon<br/>            Next<br/>        Else<br/>            'If no Exchange_Mailbox instances were returned display that.<br/>            WScript.Echo &quot;WARNING: No Exchange_Mailbox instances were returned.&quot;<br/>        End If<br/>    End If<br/>    <br/>    'Cleanup<br/>    Set objWMIExchange = Nothing<br/>    Set listExchange_Mailboxs = Nothing<br/>    Set objExchange_Mailbox = Nothing<br/>    <br/>    'Write report footer<br/>    Wscript.Echo &quot;***********************************************************************************&quot;</p> <p><br/>Next<br/>    <br/>'Cleanup<br/>Set oRs = Nothing<br/>'oCon.Close<br/>Set oCon = Nothing<br/>Set oCommand = Nothing<br/>Set oRoot = Nothing<br/>Set oDomain = Nothing<br/>objConnection.Close<br/><br/>Regards<br/>SAK</p>Thu, 19 Nov 2009 20:36:37 Z2009-11-21T16:12:01Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/914780f6-88de-44fe-ad62-5a030b1c7cf4http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/914780f6-88de-44fe-ad62-5a030b1c7cf4Johan Schurmanshttp://social.technet.microsoft.com/Profile/en-US/?user=Johan%20SchurmansEWS service gives 403 ForbiddenHi,<br/><br/>We are trying to use the Exchange Web Services with an XML post to <br/><a>https://servernname/EWS/exchange.asmx</a>. In the example below we try to get the <br/>unread items of a user's inbox.<br/>This xml post worked until we upgraded from Exchange SP2 RU8 to Exchange SP2 <br/>RU9 on the CAS servers. We always get the code 403 Forbidden. A HTTP GET to  <br/><a>https://servernname/EWS/exchange.asmx</a> gives the Services.wsdl file (code 200)<br/><br/>On a new installed CAS server in the same environment, we also did the <br/>upgrade from RU8 to RU9. After this upgrade the xml post its keeps on working.<br/><br/>Here is the xml post:<br/><br/>$cdUsrCredentials = new-object <br/>System.Net.NetworkCredential(&quot;username&quot;,&quot;password&quot;,&quot;DOMAIN&quot;)<br/>$smSoapMessage  = &quot;&lt;?xml version='1.0' encoding='utf-8'?&gt;&quot; `<br/>+ &quot;&lt;soap:Envelope xmlns:soap=`&quot;<a>http://schemas.xmlsoap.org/soap/envelope/</a>`&quot; &quot; `<br/>+ &quot; xmlns:xsi=`&quot;<a>http://www.w3.org/2001/XMLSchema-instance</a>`&quot; <br/>xmlns:xsd=`&quot;<a>http://www.w3.org/2001/XMLSchema</a>`&quot;&quot; `<br/>+ &quot; xmlns:t=`&quot;<a>http://schemas.microsoft.com/exchange/services/2006/types</a>`&quot; &gt;&quot; `<br/>+ &quot;&lt;soap:Header&gt; &quot; `<br/>+ &quot;&lt;/soap:Header&gt; &quot; `<br/>+ &quot;&lt;soap:Body&gt;&quot; `<br/>+ &quot;&lt;GetFolder <br/>xmlns=`&quot;<a>http://schemas.microsoft.com/exchange/services/2006/messages</a>`&quot; &quot; `<br/>+ &quot; xmlns:t=`&quot;<a>http://schemas.microsoft.com/exchange/services/2006/types</a>`&quot;&gt; &quot; `<br/>+ &quot;&lt;FolderShape&gt; &quot; `<br/>+ &quot;&lt;t:BaseShape&gt;Default&lt;/t:BaseShape&gt; &quot; `<br/>+ &quot;&lt;/FolderShape&gt; &quot; `<br/>+ &quot;&lt;FolderIds&gt; &quot; `<br/>+ &quot;&lt;t:DistinguishedFolderId Id=`&quot;inbox`&quot;/&gt; &quot; `<br/>+ &quot;&lt;/FolderIds&gt; &quot; `<br/>+ &quot;&lt;/GetFolder&gt; &quot; `<br/>+ &quot;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;&quot;<br/><br/>$servername = &quot;outlookanywhere.domain.com&quot;<br/>$strRootURI = &quot;https://&quot; + $servername + &quot;/ews/Exchange.asmx&quot;<br/>$WDRequest = [System.Net.WebRequest]::Create($strRootURI)<br/>$WDRequest.ContentType = &quot;text/xml&quot;<br/>$WDRequest.Headers.Add(&quot;Translate&quot;, &quot;F&quot;)<br/>$WDRequest.Method = &quot;Post&quot;<br/>$WDRequest.Credentials = $cdUsrCredentials<br/>$bytes = [System.Text.Encoding]::UTF8.GetBytes($smSoapMessage)<br/>$WDRequest.ContentLength = $bytes.Length<br/>$RequestStream = $WDRequest.GetRequestStream()<br/>$RequestStream.Write($bytes, 0, $bytes.Length)<br/>$RequestStream.Close()<br/>$WDResponse = $WDRequest.GetResponse()<br/>$ResponseStream = $WDResponse.GetResponseStream()<br/>$ResponseXmlDoc = new-object System.Xml.XmlDocument<br/>$ResponseXmlDoc.Load($ResponseStream)<br/>$UreadNameNodes = @($ResponseXmlDoc.GetElementsByTagName(&quot;t:UnreadCount&quot;))<br/>&quot;Number of Unread Email : &quot; + $UreadNameNodes[0].'#text'<br/><br/>How can we debug this EWS error? We have to get it working again without a <br/>reinstall of all the 4 CAS servers<br/><br/>A reinstall of the EWS virtual directory did not work.<br/><br/>Thanks!<br/><br/>Kind regards,<br/>Johan<br/>Thu, 19 Nov 2009 13:38:49 Z2009-11-21T06:19:12Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/137ee6ef-845c-44e2-b09a-11be566c3962http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/137ee6ef-845c-44e2-b09a-11be566c3962tkedhttp://social.technet.microsoft.com/Profile/en-US/?user=tkedEWS Create Contact on Second Contact FolderCan someone please help me out...<br/><br/>I have a contacts folder under the Public Folder and i'm able to update, delete and insert items to it with no problem.   But I cannot figure out how to add a new contact to the folder.  <br/><br/>If I use the Contact contact = new Contact(service);  the item will be added to my default folder....<br/><br/>Any help would be greatful.<br/><br/>Thanks,<br/><br/><br/>tkedFri, 20 Nov 2009 22:18:21 Z2009-11-23T18:57:14Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/8bbe5136-2a7b-4720-a982-0e00e86d1348http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/8bbe5136-2a7b-4720-a982-0e00e86d1348nosnetromhttp://social.technet.microsoft.com/Profile/en-US/?user=nosnetromQuerying Exchange Server 2003 from SQL Server 2005?<p>We have a business partner that is emailing data to us, and I need to extract the data from the body of the messages. I've developed regular expressions to do this, but I still need to programmatically access the messages themselves. Here are the details:</p> <ul> <li>Exchange server: mail01.example.com</li> <li>SQL Server: sql01.example.com</li> <li>Exchange mail account: <a href="mailto:testresults@example.com">testresults@example.com</a> </li> </ul> <p>I have successfully created a linked server to Exchange in SQL Server Management Studio, as follows:</p> <ul> <li>Name: EXCHANGE</li> <li>Product: Exchange OLE DB provider</li> <li>Provider: Search.Collator.DSO</li> <li>Data_Source: ExOLEDB.DataSource</li> <li>Location: mail01.example.com</li> <li>Provider_String: Provider=ExOLEDB;Persist Security Info=True;Integrated Security=SSPI;Trusted_Connection=Yes;</li> <li>Catalog: NULL</li> </ul> <p>I have tried running a test query against the linked Exchange server, just trying to retrieve the addresses of mail senders, as follows:</p> <pre>SELECT Convert(nvarchar(50), &quot;urn:schemas:httpmail:from&quot;) Sender FROM OpenQuery(Exchange, 'SELECT &quot;urn:schemas:httpmail:from&quot; FROM &quot;.\testresults\inbox&quot;')</pre> <p>From that query, I get the following error message:</p> <pre>OLE DB provider &quot;Search.CollatorDSO&quot; FOR linked server &quot;Exchange&quot; returned message &quot;Column does not exist.&quot;. Msg 7321, Level 16, State 2, Line 1 An error occurred while preparing the query &quot;SELECT &quot;urn:schemas:httpmail:FROM&quot; FROM &quot;.\testresults\inbox&quot;&quot; FOR execution against OLE DB provider &quot;Search.CollatorDSO&quot; FOR linked server &quot;Exchange&quot;.</pre> <p>I get the feeling that I have not correctly defined the path to the user account and Inbox, but it really could be ANYTHING at this point. (BTW, I apologize for already having cross-posted in the SQL Server forum.) Can anyone provide some guidance? TIA for your help! :-)</p>Fri, 20 Nov 2009 17:04:37 Z2009-11-20T17:04:38Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/e769de81-1492-4fbd-afaa-280368a78edehttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/e769de81-1492-4fbd-afaa-280368a78edealoneguidhttp://social.technet.microsoft.com/Profile/en-US/?user=aloneguidPR_URL_NAME missing in Exchange 2010Today I started migrating my app to Exchange 2010 and noticed that PR_URL_NAME MAPI property is missing. How do I get the path of an item now?Tue, 17 Nov 2009 10:38:22 Z2009-11-20T12:01:01Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/242f1faa-60b8-4efe-a9d5-40fc8b48b79fhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/242f1faa-60b8-4efe-a9d5-40fc8b48b79fExchange_buddyhttp://social.technet.microsoft.com/Profile/en-US/?user=Exchange_buddyGetting All deleted appointment from Calendar folderHello,<br/>           I am trying to findout itemid of all deleted appointment but i could not make it. does anyone used it . I am in kind of trouble.I deleted many appointment but never able to get Id for those appointment. i would appreciate your earlier response. here is code. as you see my code i am getting new created/update item without any problem but somehow i am unable to get deleted appointment id. does anyone know why...<br/> <br/> Dim request As New SyncFolderItemsType()<br/> <br/>             request.MaxChangesReturned = 512<br/> <br/>             Dim InboxFolderID As New DistinguishedFolderIdType()<br/> <br/>             InboxFolderID.Id = DistinguishedFolderIdNameType.calendar<br/> <br/>             request.SyncFolderId = New TargetFolderIdType()<br/> <br/>             request.SyncFolderId.Item = InboxFolderID<br/> <br/>             Dim itemProperties As New ItemResponseShapeType<br/> <br/>             itemProperties.BaseShape = DefaultShapeNamesType.IdOnly<br/> <br/>             request.ItemShape = itemProperties<br/>             Dim strMySyncID As String<br/>             strMySyncID = &quot;H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In6NX+PX+TXoOfjF+w+P9+/d3znePnlwfLC9f3xyb/vJyZOT7Wd7Tw5Onjx49vD+/Z1f8t3X49fXy+nrNmvzk2yZ1de/xqP3f/NZVc7y+mz2azx8/3d/Mq+bolr+Gofv/+p36f/1IqvfypCTX+PX+C3oa0WmzRcNWv4avzl9tUP/H6PNH/Wb/Br/9Z/2D/8Xn/+5//Wf+wt+1e9SXP+av8bf8u/97b/R5V/+G3znL/j8T/8//sq//tea/xq/xq/5F/4y+vfX+jV+E/o/Pb/+r/Fr/Ff044vjl2dfHL/AJ7/Gs/vPfvLXpp9/Cf3/0a/hnpf0/1/g/b2k/+97fw89X/3x/+lf8O0/8xef/Mlf/hrr32P8Z/yur/jTX/PX+tu//DP/gz+39+2v82t894/8DV79GX/Zn/kHvPw1f61f59Xf/l//V0/+pd/tyb/9uz35T363l7/u8je49xMfv/w17n752emyuarqdp6+ns6rqrz75Vefnb54/d0vX7359t3p8rNX+bRYFfmybfBX065n9Pvu7q/x6Nf6NX6N/wcClXUSRAIAAA==&quot;<br/>             request.SyncState = strMySyncID<br/> <br/>             Dim response As SyncFolderItemsResponseType = service.SyncFolderItems(request)<br/> <br/>             Dim responseMessage As SyncFolderItemsResponseMessageType = TryCast(response.ResponseMessages.Items(0), SyncFolderItemsResponseMessageType)<br/> <br/>             If responseMessage.ResponseCode &lt;&gt; ResponseCodeType.NoError Then<br/> <br/>                 Throw New Exception(&quot;SyncFolderItems failed with response code: &quot; &amp; responseMessage.ResponseCode.ToString())<br/> <br/>             End If<br/>             Dim deleteitems As New List(Of ItemIdType)<br/>             Dim createitems As New List(Of ItemType)<br/>             Dim updateitems As New List(Of ItemType)<br/> <br/>             For index As Integer = 0 To responseMessage.Changes.Items.Length - 1<br/>                 Select Case (responseMessage.Changes.ItemsElementName(index))<br/>                     <br/>                     Case ItemsChoiceType2.Delete<br/>                         Dim delete As SyncFolderItemsDeleteType = TryCast(responseMessage.Changes.Items(index), SyncFolderItemsDeleteType)<br/>                         deleteitems.Add(delete.ItemId)<br/>                     Case ItemsChoiceType2.Create<br/>                         Dim create As SyncFolderItemsCreateOrUpdateType = TryCast(responseMessage.Changes.Items(index), SyncFolderItemsCreateOrUpdateType)<br/>                         createitems.Add(create.Item)<br/>                     Case ItemsChoiceType2.Update<br/>                         Dim update As SyncFolderItemsCreateOrUpdateType = TryCast(responseMessage.Changes.Items(index), SyncFolderItemsCreateOrUpdateType)<br/>                         updateitems.Add(update.Item)<br/>                 End Select<br/>                 strMySyncID = responseMessage.SyncState<br/>             Next<br/>Fri, 30 Oct 2009 17:55:02 Z2009-11-23T08:45:47Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/9dc31da6-bc01-4a70-ba2b-b7a67c202305http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/9dc31da6-bc01-4a70-ba2b-b7a67c202305Exchange_buddyhttp://social.technet.microsoft.com/Profile/en-US/?user=Exchange_buddyGet Detail of appointment frim giving itemidHello,<br/>             does anyone know how to get all detail like (subject,body,category,start date,end date,location) from given item id. I have some list of item id which i saved in database and i need to pull all its detail after certain time period. please reply me ASAP.<br/>Wed, 18 Nov 2009 18:54:42 Z2009-11-20T00:43:38Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/eff32c39-ac25-438c-b30b-c0aca3842bc0http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/eff32c39-ac25-438c-b30b-c0aca3842bc0NagiReddy.Yhttp://social.technet.microsoft.com/Profile/en-US/?user=NagiReddy.YWhere i can download the Exchange server 2007 API and how to use the API in ProgrammingWhere i can how find the download of Exchange server 2007 API and some documentation links how to use the API in C#.netThu, 19 Nov 2009 06:10:45 Z2009-11-19T20:26:33Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/2fc22375-8c3c-4dfb-a72d-156088615696http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/2fc22375-8c3c-4dfb-a72d-156088615696Kim Brandlhttp://social.technet.microsoft.com/Profile/en-US/?user=Kim%20BrandlEWS Managed API: wrong Id formatThe XML response indicates that the server is an Exchange 2007 SP1 server, but the XML request specifies Exchange2010 as the RequestServerVersion in the SOAP header -- you cannot send a 2010 request to a 2007 SP1 server (hence the error you are receiving). Since the server is an Exchange 2007 SP1 server, you must specify Exchange2007_SP1 as the RequestServerVersion value when you instantiate the ExchangeService.<br/><br/> <pre lang=x-vbnet>Dim service As ExchangeService = New ExchangeService(ExchangeVersion.Exchange2007_SP1)</pre><hr class="sig">Programming Writer, Microsoft Exchange Developer Documentation TeamThu, 19 Nov 2009 03:55:56 Z2009-11-19T19:24:41Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1d52c6e5-98d8-465e-8536-c66982fd3726http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1d52c6e5-98d8-465e-8536-c66982fd3726jrvkhttp://social.technet.microsoft.com/Profile/en-US/?user=jrvkCan't set msExchMailboxGuid via LDAP<font size=2><span style="font-family:Arial">Hi,<br><br>I am creating new active directory user account in Java and LDAP. I want to mail enable it for Exchange 2007. I am able set all needed attributes in my code except one: msExchMailboxGuid.<br>When I try to set </span></font><font size=2><span style="font-family:Arial">msExchMailboxGuid attribute this way:<br><br></span></font><font size=2><span style="font-family:Arial"><span style="font-family:Courier">attrs.put(&quot;msExchMailboxGuid&quot;,&quot;55ee6c37-b44b-47b1-a733-6d3c1b615b90&quot;);</span><br><br>I get this error:<br><br><span style="font-family:Courier">Problem creating object: javax.naming.directory.InvalidAttributeValueException: [LDAP: error code 19 - 00002082: AtrErr: DSID-03151145, #1:</span><br style="font-family:Courier"><span style="font-family:Courier">    0: 00002082: DSID-03151145, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 2bc62b32 (msExchMailboxGuid):len 36]; remaining name 'CN=Albert Einstein,OU=ExchTestUsr,DC=tst,DC=cz'</span><br><br>The guid was generated online at http://www.famkruithof.net/uuid/uuidgen.<br><br>Do you have any idea what is the problem?<br><br>Thanks in advance.<br></span></font>Wed, 12 Nov 2008 08:44:53 Z2009-11-19T17:48:56Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/484f9771-d33b-402a-a586-a8c64b58dc01http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/484f9771-d33b-402a-a586-a8c64b58dc01David Sterling - MSFThttp://social.technet.microsoft.com/Profile/en-US/?user=David%20Sterling%20-%20MSFTThe VoiceMail folder in EWS<p align=left><font face=Arial size=2>You may have noticed that DistinguishedFolderIdNamesType offers a &quot;voicemail&quot; enumeration value.  There are several things to keep in mind about this folder:</font></p> <p align=left> </p> <p align=left><strong>What folder does is relate to?</strong></p> <p align=left>The voicemail distinguished folder relates to the VoiceMail *search folder* that exists under the Search Folders node in Outlook.  In fact, if you want to see the voicemail folder directly, call FindFolder against DistinguishedFolderIdNamesType.searchfolders.  If the voice mail folder exists, it will appear as a child.</p> <p align=left> </p> <p align=left><strong>When is it created?</strong></p> <p align=left>The voicemail search folder is created first when a given mailbox user is UM-enabled.  It is not when the first voice mail arrives (I think I mispoke in the EWS book regarding this).  If for some reason, the voicemail search folder is deleted, the ONLY time it is recreated is when you dial into the UM phone system and try to listen to your voice messages.  This will work even if there are no voice messages in your inbox.  Of course, if you have forgotten your pin or access number, you can use OWA or Outlook 2007 to reset your pin and what not.  In E2007, there is no other way to have your voice mail search folder recreated.</p> <p align=left> </p> <p align=left><strong>Problems you may encounter</strong></p> <p align=left>Search folders may age out over time due to lack of use.  This is because the Exchange store must maintain and index for each search folder and doing so isn't cheap.  In fact, if you look at the search folders in OL2007, there will be some that are italicized.  Those don't actually exist in your mailbox anymore.  However, double click on one of those causes the search folder to be recreated (which causes Exchange to regenerate the index, etc...).  Now, we have had some isolated cases where double clicking on the voice mail folder (when it is italicized) causes the voice mail folder to be regenerated in such a way that EWS cannot see if (via DistinguishedFolderIdNamesType.voicemail).  It will simply return ErrorFolderNotFound.  Yet, it is indeed there.  If you call FindFolder against the searchfolders distinguished folder id, you will indeed see it.  This is an known issue.  You have two options in this case.  You can either grab the folderId of the voice mail folder after a FindFolder against searchfolders, although I highly discourage this given that you would have to determine the voicemail folder by display name which isn't exceedingly reliable.  The other option (which isn't pretty either) is to delete the voice mail search folder and then dial into the UM system and check you voice mail so that Exchange recreates the voice mail search folder.  Then EWS will be able to see it.</p> <p align=left> </p> <p align=left>Keep in mind that the existence (or lack thereof) of the voice mail search folder does NOT affect the delivery of voice mails to your mailbox.  The voicemail search folder simply makes it easier for you to see which email messages are actually voice mails.</p> <p align=left> </p> <p align=left>Hope this helps.</p> <p align=left><strong></strong> </p>Fri, 14 Mar 2008 13:18:26 Z2009-11-19T16:53:31Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/bf1c01e5-92b5-4b37-92cd-e0c6a6a1e6fchttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/bf1c01e5-92b5-4b37-92cd-e0c6a6a1e6fcAtul Surekahttp://social.technet.microsoft.com/Profile/en-US/?user=Atul%20SurekaUnable to use powershell from C# - The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this machineHi,<br/><br/>I want to execute cmdlet from C# code. Following is the code snippet<br/><br/>------------------------------------<br/><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small"><font size=2 color="#2b91af"><font size=2 color="#2b91af"> <p>RunspaceConfiguration</p> </font></font></span><font size=2 color="#2b91af"> <p> </p> </font></span> <p><span style="font-size:x-small"> rsconfig = </span><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">RunspaceConfiguration</span></span><span style="font-size:x-small">.Create();<font size=2> <p> </p> </font></span></p> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">PSSnapInException</span></span><span style="font-size:x-small"> snapEx = </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">null</span></span><span style="font-size:x-small">;<font size=2> <p> </p> </font></span></p> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">PSSnapInInfo</span></span><span style="font-size:x-small"> pssnap = rsconfig.AddPSSnapIn(</span><span style="color:#a31515;font-size:x-small"><span style="color:#a31515;font-size:x-small">&quot;Microsoft.Exchange.Management.PowerShell.Admin&quot;</span></span><span style="font-size:x-small">, </span><span style="color:#0000ff;font-size:x-small"><span style="color:#0000ff;font-size:x-small">out</span></span><span style="font-size:x-small"> snapEx);<font size=2> <p> </p> </font></span></p> <p><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">Runspace</span></span><span style="font-size:x-small"> rscmdlet = </span><span style="color:#2b91af;font-size:x-small"><span style="color:#2b91af;font-size:x-small">RunspaceFactory</span></span><span style="font-size:x-small">.CreateRunspace(rsconfig); <p>rscmdlet.Open();<br/><br/>--------------------------------<br/><br/>This throws exception &quot;The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this machine.&quot;   I verified that exchange management tool, windows power shell &amp; exchange management shell is installed on my machine. <br/><br/>I am building my C# code in &quot;Any CPU&quot; configuration. Tried with x64 as well but no luck.<br/><br/>I tried executing the following command from exchange management shell &amp; getting the same error.<br/>add-pssnapin Microsoft.Exchange.Management.PowerShell.Admin<br/><br/><strong>machine configuration<br/></strong>Exchange version : : 14.00.0639.014<br/>OS : Windows 2008 64 bit<br/><br/>Can anybody please tell what is missing on machine &amp; from where to install the missing component.<br/><br/>Atul Sureka</p> </span></p><hr class="sig">atul surekaTue, 10 Nov 2009 07:20:29 Z2009-11-19T15:00:02Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/e0be6236-ec24-4a4c-844e-cf347f8e21e2http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/e0be6236-ec24-4a4c-844e-cf347f8e21e2SAK80http://social.technet.microsoft.com/Profile/en-US/?user=SAK80How to extract MailboxRight for all usersHi <br/><br/>As a exchange administrator , I need to extract the mailboxRights for all users in our organisation.How will I get a script to do that?<br/><br/>Or How can I extract send As permission for each user<br/><br/>I have tried to use csvde command with msExchMailboxSecurityDescriptor attribute ..but no hope... <br/><br/>We are using exchange 2003 / 40000+ users<br/><br/>Regards<br/>SAKWed, 18 Nov 2009 20:03:40 Z2009-11-19T10:24:11Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1d8e22c8-ac0f-404a-acd4-857bb325acbahttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/1d8e22c8-ac0f-404a-acd4-857bb325acbaSascha Lindtnerhttp://social.technet.microsoft.com/Profile/en-US/?user=Sascha%20LindtnerProblem with Contact.Update(...) EWS Managed API Hello,<br/> <br/> we are currently writing a server based synchronisation tool between our own CRM Software and Exchange. A few month ago I have completed a service to sync appointments from our SQLServer to Exchange. It works fine. Now we want to sync Contacts from CRM -&gt; Exchange. Creating Contacts is no problem (excluding the &quot;Title&quot; :) ). But now I have a little problem with the Update( ... ) Method from the Contact object. <br/> <br/> In the case that I see that data from a contact has changed, we set all data new and call the update method. But here i got a Exception that says: <strong>An object within a change description must contain one and only one property to modify<br/> <br/> </strong> But... After trying out different ways and jumping around in my code, I discoverd that we can set more than one property and call Update( ... ) without getting a exception.<br/> For Example:<br/> <br/> <pre lang=x-vbnet>If Not String.IsNullOrEmpty(company.InterNet) Then mContactperson.BusinessHomePage = company.InterNet If Not String.IsNullOrEmpty(company.Telefon) Then mContactperson.PhoneNumbers(PhoneNumberKey.BusinessPhone) = company.Telefon If Not String.IsNullOrEmpty(company.Telefon) Then mContactperson.PhoneNumbers(PhoneNumberKey.BusinessFax) = company.Telefax</pre> Update( ... ) works...<br/> <br/> Also <br/> <br/> <pre lang=x-vbnet>' mContactperson is a 'Contact' object If Not String.IsNullOrEmpty(company.InterNet) Then mContactperson.BusinessHomePage = company.InterNet If Not String.IsNullOrEmpty(company.Telefon) Then mContactperson.PhoneNumbers(PhoneNumberKey.BusinessPhone) = company.Telefon If Not String.IsNullOrEmpty(company.Telefon) Then mContactperson.PhoneNumbers(PhoneNumberKey.BusinessFax) = company.Telefax Dim PHAdress As New PhysicalAddressEntry If Not String.IsNullOrEmpty(company.Adresse.Ort) Then PHAdress.City = company.Adresse.Ort If Not String.IsNullOrEmpty(company.Adresse.Staat) Then PHAdress.State = company.Adresse.Staat If Not String.IsNullOrEmpty(company.Adresse.Plz) Then PHAdress.PostalCode = company.Adresse.Plz mContactperson.PhysicalAddresses.Item(PhysicalAddressKey.Business) = PHAdress</pre> Update( ... ) works...<br/> <br/> But when I now set another physical adress like this...<br/> <br/> <pre lang=x-vbnet>' mContactperson is a 'Contact' object If Not String.IsNullOrEmpty(company.InterNet) Then mContactperson.BusinessHomePage = company.InterNet If Not String.IsNullOrEmpty(company.Telefon) Then mContactperson.PhoneNumbers(PhoneNumberKey.BusinessPhone) = company.Telefon If Not String.IsNullOrEmpty(company.Telefon) Then mContactperson.PhoneNumbers(PhoneNumberKey.BusinessFax) = company.Telefax Dim PHAdress As New PhysicalAddressEntry If Not String.IsNullOrEmpty(company.Adresse.Ort) Then PHAdress.City = company.Adresse.Ort If Not String.IsNullOrEmpty(company.Adresse.Staat) Then PHAdress.State = company.Adresse.Staat If Not String.IsNullOrEmpty(company.Adresse.Plz) Then PHAdress.PostalCode = company.Adresse.Plz mContactperson.PhysicalAddresses.Item(PhysicalAddressKey.Business) = PHAdress Dim PrivatePHAddress As New PhysicalAddressEntry() mContactperson.PhysicalAddresses.Item(PhysicalAddressKey.Home).Street = ap.Adresse.Straße mContactperson.PhysicalAddresses.Item(PhysicalAddressKey.Home).City = ap.Adresse.Ort mContactperson.PhysicalAddresses.Item(PhysicalAddressKey.Home).PostalCode = ap.Adresse.Plz mContactperson.PhysicalAddresses.Item(PhysicalAddressKey.Home).State = ap.Adresse.Staat</pre> Update throws the exception<br/> <br/> So it seems editing more than one physical adress causes the problem. But what makes me real confusing is that I also get the exception when we call Update( ... ) between editing the two physical adresses. Is this the wrong way to update a contact?<br/> <br/>Wed, 18 Nov 2009 10:58:37 Z2009-11-18T19:02:40Zhttp://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3b2aece3-82aa-427c-9c21-5ba07b6f1a09http://social.technet.microsoft.com/Forums/en-US/exchangesvrdevelopment/thread/3b2aece3-82aa-427c-9c21-5ba07b6f1a09FabioPaxhttp://social.technet.microsoft.com/Profile/en-US/?user=FabioPaxRoutingAgent and meeting requestsHello,<br/>i would like to write an exchange 2007 routing agent that intercept meeting requests and can read all data of meeting.<br/>I succeded in intercepting meeting message, but I can not find where the meeting information is stored.<br/>I've analyzed all headers, but no header about meeting is present. I've found that EmailMessage class has a property CalendarPart, but it is always null. I need to access start and end date of meeting for example.<br/><br/>Another question is if it's possible to send a reply message inside the routing agent.<br/><br/>Anyone can help me?<br/><br/>Thanks in advance,<br/>Fabio.Wed, 18 Nov 2009 18:05:30 Z2009-11-18T18:05:31Z