Skip to main content

Posts

Showing posts from 2015

Showing the Calendar Configuration of a Mailbox or Meeting Room using EWS

When you configure Calendar processing settings in Exchange either using the Exchange Administrator Centre via the Exchange Management Shell (Set-CalendarProcessing) many of these setting get held in a FAI (Folder Associated Item) in the Calendar Folder of the Mailbox in question. In EWS you can access these configuration objects using the UserConfiguration operation and classes. The Calendar settings are stored in the Roaming Dictionary format to store each of the different Key and Value pairs. For some of the settings like the bookin policy (In-policy meeting requests) and (Out-of-policy meeting requests) these are stored as an array of ExchangeDn's. I've put together a script cmdlet called Show-CalendarSettings that can dump out the Roaming dictionary setting for a Calendar Configuration object using EWS. And also for the BookIn and RequestIn policy it will loop through each of the ExchangeDn's in the array and try to resolve each of the entries via ResolveName . A

Finding RMS Items in a Mailbox using EWS

If you want to search for emails that have been protected using AD Rights Managed Service using EWS there are a few challenges. How RMS works with Email it is documented in the following Exchange Protocol document https://msdn.microsoft.com/en-us/library/cc463909(v=exchg.80).aspx . The important part when it comes to searching is PidNameContentClass property https://msdn.microsoft.com/en-us/library/office/cc839681.aspx  which on RMS messages gets set to rpmsg.message. So to search for this Internet Header you can use a SearchFilter like the following to define the ExtendProperty to search folder $contentclassIh = New-Object Microsoft.Exchange.WebServices.Data.ExtendedPropertyDefinition( [Microsoft.Exchange.WebServices.Data.DefaultExtendedPropertySet] :: InternetHeaders, "content-class" , [Microsoft.Exchange.WebServices.Data.MapiPropertyType] :: String) ; $sfItemSearchFilter = new-object Microsoft.Exchange.WebServices.Data.SearchFilter+IsEqualTo( $contentclassIh , &q

Finding the TimeZone being used in a Mailbox using EWS

If you ever have the need to create a number of events in user mailbox's from a central application or Script where the target Mailboxes span across different time zones then finding each target Mailbox's timezone is a critical thing. In this post I'm going to outline a few different methods of getting the TimeZone using EWS. If you have access to the Exchange Management Shell cmdlet's to find the users configured timezone you can use either the Get-MailboxCalendarConfiguration or Get-MailboxRegionalConfiguration cmdlets which show you the timezone settings of a Mailbox from the WorkHours configuration of that mailbox. The object in the Mailbox that the information is read from/stored in is the IPM.Configuration.WorkHours FAI (Folder Assoicated Items) object in the Calendar Folder of the Mailbox. So if you want to access the TimeZone setting in Mailbox just using EWS you need to Bind to this UserConfiguration object (FAI object) and then parse the TimeZone Settings ou

Using eDiscovery to do a Multi Mailbox search for Mailbox Item Statistics in Exchange

eDiscovery in Exchange 2013 and above has a multitude of uses when it comes to both data discovery and also reporting. One thing you can do with eDiscovery is run a single Query across multiple mailboxes using one request. A couple of month ago I posted this eDiscovery Powershell module on GitHub . This module has a number of cmdlets that does single mailbox queries using eDiscovery so I've created a new cmdlet Search-MultiMailboxesItemStats  for doing Multi Mailbox queries. This allows you to pass in an array of mailboxes you want processed and it will return statistics about how many Items and the Size of those items in bytes based on that query. For example to Query the number of Email received in the last month across a number of mailboxes use Search-MultiMailboxesItemStats -Mailboxes @( 'mailbox@domain.com','mailbox2@domain.com' )  -QueryString ('Received>' + (Get-Date).AddDays(-31).ToString("yyyy-MM-dd")) And it will output something l

Introducing the Data Rumble Message Tracking Outlook AddIn for Office 365

With great pride and a little trepidation I'd like to introduce my new venture Data Rumble and our first software release Message Tracking Outllook Addin for Office 365. As a company we are looking to focus on email data so looking at the Metadata an Email message picks up and leaves behind while its in transit to and from a mailbox is the logical first step for us. Launching something new is a lot of work so this first release is a bit of dry run to get all the underlying infrastructure and procedures in place. At release the main feature of this AddIn is that it allows you to perform a Message Trace on a Message from within Outlook itself using the Office365 Reporting Web Service . This is a REST endpoint that allows you to perform a number of different Office365 Administrative reporting tasks it has been around for a couple of years now and pre dates some of the oauth features that the newer mailbox REST services have so I expect the Endpoint will change soon  (it also has t

Unread email ews Powershell Module with reply and forward counting

I've done a few of these Unread / Unused mailbox scripts over the years but this one has a bit of a difference. As well as counting the Total number of unread email in the Inbox over a certain period of time it uses the PidTagLastVerbExecuted property to count how many email messages over that period of time had the client action ReplytoSender, ReplyAll or forwarded and also the number of email in the SentItems folder. This property is set on messages in the Inbox message when one of those actions is taken by the client so it is useful for tracking the use of Mailboxes and gathering statistics around how they are being used. eg here are a few samples of running this module The code uses both EWS and the Exchange Management Shell to get information about the Mailbox so you need to run it from within the EMS or a Remote PowerShell session (see this if your running it from Office365). I've put the script up on GitHub or you can download it from here . I've also create
All sample scripts and source code is provided by for illustrative purposes only. All examples are untested in different environments and therefore, I cannot guarantee or imply reliability, serviceability, or function of these programs.

All code contained herein is provided to you "AS IS" without any warranties of any kind. The implied warranties of non-infringement, merchantability and fitness for a particular purpose are expressly disclaimed.