Somebody asked this morning about using WMI and Exchange in c#. There's a lot of good information on the Web about using the System.Management namespace to access WMI but not many Exchange specific C# samples at the moment. I decided to convert a few of the examples I've used in the scripts in my blog. The first is a simple mailbox size example System.Management.ConnectionOptions objconn = new System.Management.ConnectionOptions(); objconn.Impersonation = System.Management.ImpersonationLevel.Impersonate; objconn.EnablePrivileges = true; string cServername = "servername"; System.Management.ManagementScope exmangescope = new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2",objconn); System.Management.ObjectQuery objquery = new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox"); System.Management.ManagementObjectSearcher objsearch = new System.Management.ManagementObjectSearcher(exmangescope,o
Pushing the Envelope in Messaging and Office 365 Development