Skip to main content

Posts

Showing posts from July, 2007

Show Users last Message Sent and Received Times,Subject in a Form using Powershell against Exchange 2007 Message Tracking Logs

In the past I’ve written and shown many ways to use Message tracking Log data in Exchange 2000-2003 using the WMI MessageTrackingLog class. With Exchange 2007 the WMI class is now gone replaced with a new Exchange Management Shell Powershell cmdlet. Although losing the richness of WQL is a little bit of shame the new cmdlet is pretty funky especially the little status bar (that’s gold). Message Tracking Logs can have many uses none more so then showing you current mailbox activity like who is actively sending and receiving mail in the last X number of minutes which may be important to you if you are working late at night on a server and you need to know who is active. This is my first go at a messagetracking log script for 2007 and I must admit I’m lacking some good load data at the moment for Exchange 2007. What this script does is creates a winform with a few Date and Time controls and populates a Drop down box with the names of the Exchange servers within an Exchange organiz...

Turning on Filter Junk Email in Exchange 2007 via an OWA Script

In the past I’ve posted a few scripts for setting and reading the OWA junk email filter settings here . While content filtering and the IMF have changed in Exchange 2007 there are still no cmdlets that will allow you to flip this option on or off for users so this little script still can come in handy for various situations. Because OWA was rewritten from the ground up in Exchange 2007 the old script method no longer works. However the same methods of reverse engineering the OWA method do work with a few additions. Using the MSXML2.ServerXMLHTTP.6.0 object this object is included with the Microsoft XML Parser (MSXML) and is a better choice for this script because it firstly supports the ability to ignore any SSL errors that might happen (eg self signed Certs, Alternate names etc) and it also handles dealing with the Forms Based Authentication cookie without the necessity to add additional code. The code still needs to perform the synthetic forms logon this works similar to 2003 with a ...

Setting the Homepage on a Outlook Folder via a script

I’ve had a number of people ask this question in the past so I thought I’d post up a script to help out those they may want to look at doing this. When you set the Outlook homepage within Outlook it configures the PR_FOLDER_WEBVIEWINFO or http://schemas.microsoft.com/mapi/proptag/0x36DF0102 property. This property is a Binary property who’s format is undocumented but using a Mapi editor like OutlookSpy or MfcMapi you can work out the format that this follows. The basic format is dwVersion: 0x00000002 dwType: 0x00000001 dwFlags: 0x00000001 dwUnused: 0x0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000 cbData: 0x188 (000000BC) bData: http://yoururl.com If you want to set this property in a script the 3 values you need to worry about are dwFlags If this is set to 1 then the check box in Outlook for “Show homepage by default for this folder” will be checked. cbData is the number of b...

Synconize items from a public folder to a mailbox folder with WebDAV replication

A while ago I wrote this script to synchronize contacts from a mailbox folder to a central contacts folder using Webdav replication and CDO 1.2 as the copy mechanism. A few people have asked about going the other way eg from a central contacts folder or calendar folder to a local mailbox folder so I've managed to find a bit of time this week to create a port that would do this. The underlying functionality of how this work is written up in the other post so i won't repeat this the main points with the new script are There are four scripts in the download like the previous post there is both FBA and NTLM/Basic version to cater for different authentication. Theres also a separate version for contacts/mail objects and calendar objects. The main differences with the calendar version is that as well as copying the calendar item to the target folder it changes the colour of the appointment to blue and also sets the freebusy status of this appointment to FREE. The following lines are...
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.