Skip to main content


Showing posts from May, 2010

Generating OWA Url's for Mail Items and producing Summary Emails for Public Folders and Mailbox's with Powershell and the EWS Managed API

Its often useful to be able to create a link that will open a specific email within OWA for a variety of different uses (eg RSS feeds, Summary email, Calendar Summary pages etc). With EWS you can get the OWAid which is necessary to form an OWA URL that will be usable by using a covertid operation. Depending on whether you want to show items that are located in mailbox or public folder then you need to use one of two different objects when doing a covertid eg to convert Mailbox Items into the OWA format from a EWS Query $aiItem = New-Object Microsoft.Exchange.WebServices.Data.AlternateId $aiItem.Mailbox = "" $aiItem.UniqueId = $Item.Id.UniqueId $aiItem.Format = [Microsoft.Exchange.WebServices.Data.IdFormat]::EwsId; $owaid = $service.ConvertId($aiItem, [Microsoft.Exchange.WebServices.Data.IdFormat]::OwaId) If its a public folder use the following $aiItem = New-Object Microsoft.Exchange.WebServices.Data.AlternatePublicFolderItemId $aiItem.FolderI

Quck SMTP Bandwidth usage script for Exchange 2007

Being able to tell how much bandwidth a particular server has consumed over a period of time is quite handy when your in a pinch and trying to work out where your bandwidth is being consumed. It can also be used in a wider context when trying to work what particular patterns and pressures are happening on particular server. The latter requiring a a more lateral analysis of the data. Exchange 2007 does a good job of logging message tracking information but these create a chalenge of filtering down this information into what been sent/received and how much bandwidth being used. The first things this script does is grabs all the message tracking records for a particular time period for a paricular server (based on a cmdline parameter you pass it). It then filters just on Sent and Recieved Email and then uses a hashtable and some other filtering code to count the number of email sent and recieved based on recpients of a message (eg a message sent to 5 external recipients will be count 5
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.