Skip to main content

Posts

Showing posts with the label WebDAV

Getting Size and Item details for single folders in Exchange 2003 via Powershell

While this is now something you can do in one line in Exchange 2007 and 2010 if your migrating or managing 2000/3 you may want to get the Size and Item Count details of one particular mailbox folder for all users on a server eg how big the Inbox,SentItems or Calendar folder is. In Exchange 2003 you could get the Mailbox Size via WMI but to get an individual folder size you need to access the Mailbox itself (eg you can use pfdavadmin etc). To do this via Power shell for all users on the server you first need an ADSI query to get all the mailboxes on a particular server then you can use with WebDAV via the virtual admin root or MAPI via RDO\Redemption  http://www.dimastr.com/redemption/ which works well in Powershell. I have two scripts that use show how do to this using each of these API's which I've posted a downloadable copy here To run these scripts you need to use the Netbios name of the server as a commandline parameter the RDO version of the script looks like $snServer...

Acknowledging Appointment reminders with WebDAV

One thing that can be little tricky if your working in WebDAV is dealing with appointment reminders, especially when you have to deal with recurring appointments. If you dont use the right method its easy to break the recurrance of appointments. The best way of working something like this out is have a look at the way OWA does it and then just use the same xml. So basically what you end up with is firstly a method to acknowledge non-recurring appointment reminders by removing the reminderoffset property. And a method to acknowledge recurring appointment reminders by setting the remindernexttime property. I've put a download of this VBS script here the code looks like eg set req = Createobject("microsoft.xmlhttp") CalendarURL = "https://servername/exchange/mailbox/calendar" AppointmentURL = CalendarURL & "/appointment.eml" If RecurringAppointment = false Then xmlstr = "<?xml version=""1.0""?><a:propertyupdate xm...

Event ID 1029 Audit Report for failed Folder Access script

A couple of weeks back someone asked about a script to get details of a folder from the FID (folder ID) that is captured as part of a Event 1029 if your doing audit logging as described on msexchange.org . PFDavadmin does a good job of querying and presenting this information in a format that is compatible with what you can retrieve from the event logs but when you do turn up logging to this level the number of event that gets logged can be a bit overwhelming to use this method. So I thought I’d put together a few scripts that could automate this process and produce an htm report at the end showing which folders where accessed and by whom. Instead of searching the Exchange store for each different event to find the related Folder what I did was come up with a script that would first query every folder in every mailbox in a mail store and then build and XML file that could then be queried by another script when it came time to produce a report. The report script when it runs uses WMI ...

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...

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...

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...

Reporting on the Top 10 largest emails in each users mailbox in Exchange

Someone asked for a script last week to show the top 5 largest emails by size in each user’s mailbox being a Letterman fan (yep we get it here in Aus just no all the jokes) I tough I’d post it as a Top 10 script. You can expand on this concept to really look at the Top 10 of anything in your user's mailbox's (drum roll at meeting not included). The script is basically the mailbox content age script I posted a while ago modified to instead create a disconnected record-set of the largest 10 items in each folder in a mailbox and then basically sort this list at the end of the mailbox scan and write the top 10 largest items for each user to a separate htm file in the reports directory. To limit the query to only return the top 10 largest items in each folder the query uses the order by SQL verb to sort the result by the item size and to limit the number of results returned the range header is used in WebDAV eg req.setRequestHeader "Range", "rows=0-9" ...

Powershell form for Reporting on all Appointments in all mailboxes on a Server using WebDAV

This is another script that's similar to the last few that I've posted in that its designed to query all the mailboxes on a given server and then report the information it finds. The way this script differs is that firstly its a powershell script and secondly it creates a little Winform gui to allow you to interact with the results of the query so its no longer just a static report. The layout it reports back in is two Listviews the first list view shows a summary of the number of appointments the WebDAV query finds for each mailbox and the second is activated when you click a row in the first list view which then shows a list of the appointments in the calendar of the mailbox selected. To make this a little more useful I've added a bunch of filtering options across the top so you can take the original data captured in the appointment query and filter it in a few different ways. Eg you can filter it by the last modified date so you could answer a question such as Show me al...

Combined Summary and Audit VBS Script for all appointments in all calendars on a Server via WebDAV

This is a combination of two of my posts from last week the first was Euricelia's " Creating a Report of Meeting Organizers for all appointments in all calendars on a Server via WebDAV " script and then my " Creating a Summary Email of all appointments within a Users Calendar for given perio d" . This script goes through every mailbox on the server using WebDAV via the Exchange Virtual directory and produces a HTML report of all the meeting of all users on the server during the configured time period with Outlook hyperlinks to all the appointments. I've added two extra columns to this report the first is the free/busy status of the appointment (useful if you have change the free busy status of appointment in resource mailboxes) and also the new Time Zone Mapi property that Matt Stehle blogged about the other day. (This is displayed in the report as NewClients) which should show whether the rebasing tool has modified the appointment (whether its now set to t...

Creating a Summary Email of all appointments within a Users Calendar for given period

This is another script that might come in handy for people trying to deal with DST affected appointments. Whether you choose to Rebase your appointments with the Exchange Time Zone Update Tool or not with the number of appointments and complexity of the actions you are performing you can't be 100 % sure of covering everything so you might want to send an email to users that contains a summary of what actions you have taken (or not), what problems there might be and a summary of all current appointments in their calendar that might be affected. To make things a bit easier all the appointments are hyperlinked via Outlook links so the user can click the appointment within the summary email and have that appointment or instance of the appointment open in Outlook. I had a bit of version madness with this one for a number of reasons I started out with a CDO 1.2 version (mainly because i had most of the code already done) but I had a few problems with CDO 1.2 when trying to hyp...
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.