Skip to main content

Posts

Showing posts from May, 2007

Reporting on Mailbox sizes and counts for the Deleted-Items (or any other folder in a mailbox) for all users on a Server

Here’s one more use for an adaption of the mailbox age script I posted a while ago the mailbox manager is a great tool for enforcing age limits on mailbox folders if you would like some reporting outside of what the mailbox manager produces on folders that you intended to implement age restrictions on then this script may help. Before running this script you need to set 2 variables in the code the first is the number of days you want this script to report on. Eg if you set it to 7 days it will produce a report of the number of items and size of those items in the folder you configure in the next variable that are under 7 days old and those that are over 7 days old. The second variable that needs to be set is the folder you want to run against by default its set to the deleted items folder. numbdays = 7 folderurl = "/Deleted Items/" By default the script doesn’t re-curse sub folders within the folder you configure if you want this to happen you need to unrem the followi...

Snapshotting and Auditing changes to Mailbox folder delegation rights and Changes to Mailbox Rules

Somebody left a comment last week about displaying changes to rules and mailbox acls via an RSS feed. While this is possible it got me to thinking about maybe using a snapshot technique to track changes to delegated mailbox folder ACLS and Rules. What I mean by this is that you take an initial snapshot of the current ACL’s and Rules of a mailbox and then at sometime in the future you take another snapshot and you then compare this to the original snap and report on any changes. The cool thing about this (well what I like about it) is that this can then start to answer of number of questions for you like. Getting Notification when a user adds a forwarding rule to their mailbox – (you can then verify this against whatever email policy you have any make sure it complies) Get Notifcation when a user changes a forwarding rule on their mailbox (eg address changes) Report when a user delegates any section of the mailbox and find and fix users that have delegated there mailboxes incorrec...

Unread Email report for all Folders in all Mailboxes on an Exchange Server

Unread email is such an analogy for a lot of the problems that plague email systems. Eg if you have a piece of email that is sitting unread in your inbox for a long period of time what’s the point of you receiving this email or the person who sent it sending it. Read recipients aside most people believe that when they send an email no matter how trivial the content that you will read or delete it. In a sense unread email is limbo information serving no higher purpose then clogging up your inbox kind of like pages that are stuck together in a book. Eg how will you know if you need to keep a piece of information if you have never bothered to actually read it? Having seen the inside of far too many people’s mailboxes it seems that a lot of people have developed a seventh sense for information they haven’t read but might need to know in the future. So one Interesting Report you might want to create is to look at how much space this limbo information is taking up. The following is a scrip...

Export all Outlook contact pictures to the File System

Somebody asked a question today about how do you export all of your Outlook contact pictures to a folder in the file system. With a little CDO 1.2 this is pretty simple let’s start with some code that logs onto the mailbox and server you specify as command line parameter and then gets the contacts folder Public Const CdoDefaultFolderContacts = 5 snServername = wscript.arguments(0) mbMailboxName = wscript.arguments(1) set csCDOSession = CreateObject("MAPI.Session") pfProfile = snServername & vbLf & mbMailboxName csCDOSession.Logon "","",False,True,0,True, pfProfile set cfContactsFolder = csCDOSession.getdefaultfolder(CdoDefaultFolderContacts) When a contact in Outlook has a picture the following MAPI named property will be set to true {00062004-0000-0000-C000-000000000046}0x8015 . So in CDO 1.2 you can create a filter that will filter the collection of items in the contact folder so only those with a picture will be returned. Eg ...

Exchange 2007 Mailbox Size Powershell Form Script version 2

I've created Version 3 of the script now that gets around having to use EWS [Updated 17-5-1007 fixed URL bug] A while back I posted version 1 of this script and a few people have made me aware lately that there are a few problems with the logic I used in this script. The first problem with this script is that it expects the CAS (Client Access Role) and the Mailbox role to be on the same server which may be true if your poor like me but for a lot of large deployments, roles will be split out onto different servers. So the method I’ve used will fail if this is the case because Exchange Web Services is part of the CAS role. To solve this problem in version 2 I’ve used the Autodiscovery service which you can query with the email address of the user you want to access and Autodiscovery will then return the URL to use for EWS for this user. To make an autodicovery request you first need to find the service connection point for the Auto discovery service (the url to use in your request...

Resource Mailbox availability web page for Exchange 2007

One of the coolest new things about Exchange Web Services on Exchange 2007 is the GetUserAvailability operation. This operation gives you the ability to get the Free-busy information about a number of users with one request and also not just only whether the users are free or busy which by itself has limited use but where this adds value is that you can also request to see the basic information about the calendar appointments a user is involved in. This makes it a great building block for any small team calendars or collaborative apps you are trying to build. It’s also good if you want to build availability pages for resource mailboxes which is what I’ve used it for in this post. To provide information in a Internet portal what i put together was an Asp.net page that first makes a request to the Find Room WebService I posted the other day. This WebService returns a list of Email Address’s and DisplayName’s which can then be used in a GetUserAvailability request which will then r...
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.