Skip to main content

Posts

Showing posts from February, 2007

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

Creating a Report of Meeting Organizers for all appointments in all calendars on a Server via WebDAV

Euricelia Wanderley created the following script to do some reporting on User's meeting that fell withing the affected US DST period .Euricelia script uses some webDAV to do a expansion query of all calendar appointments in the affected period and then produces a csv of the results. The script uses a few cool tricks like parsing out the organizer of the meeting from the vcalendar stream of the appointment. I've taken this idea a little further and put together a version of the same type of thing that designed to send the user a HTML summary email that shows them all the appointments within the affected period im still working on this at the moment having a few issues linking to Exceptions of recurring appointments should kick it tommorow. I've put a downloadable copy of Euricelia script here the script itself looks like on error resume next servername = "SERVERNAME" public username public password username = "USERNAME" password = "PASSWORD" pu

Stopping and Restarting a Virtual SMTP server on Exchange 2000/2003 via Script

One thing you may need to do from time to time for a myriad of reasons is stop and start a particular instance of a Virtual SMTP server on Exchange. To do this via a script you can use the IIS provider which has a stop and start method you can use once you have connected to the object in question. A simple Example would be Set SMTPsvc = GetObject("IIS://" & Servername & "/SMTPSVC/1") SMTPsvc.Stop SMTPsvc.Start This should also work for Pop3 and IMAP4 virtual servers (as long as you use the correct path to the object). I've put a more complicated sample together that allows you to enter a servername as a commandline parameter and it will then query Active Directory to find all the SMTP Virtual Server instances on the particular server it will then connect to and query those instances on that server and restart any currently active instances. I've put a downloadable copy of the script here the script itself looks like. snServerName = wscript.arguments

Exchange 2007 Mailbox Size Powershell Form Script

This script has been superseded by Version 5 this is a much better script that doesn't require EWS and also allows you see quota usage click here to goto version 5. With the demise of the Exchange_Mailbox WMI class in Exchange 2007 the new method of getting Mailbox sizes on Exchange 2007 has moved into the Exchange Management Shell via the new get-mailboxstatistics cmdlet. Mailbox sizes in themselves while useful can’t tell you where the space in a particular mailbox is being used. This is where you need to be able to drill down into the mailbox folders themselves and see where a user in particular is using their space eg(inbox, sent items etc). So I’ve put together a powershell script that can do just that it creates a winform that allows you to select what server you want to report on. Then it will run the get-mailboxstatistics cmdlet to retrieve all mailbox sizes for all users on this server you select and populate a ListView with these values. An event is wired to the ListVie

Creating a RSS feed of all new items in all public folders over the past 24 hours

I’m having a bit of a RSS feed week this week here’s another interesting one. A while ago I created this RSS event sink for a public folder that would generate a feed whenever a new item was posted in a Public Folder. This is useful but over a large number of folders having a separate feed for every folder is a pain and usually it’s a matter of getting across the new information that’s been added to a possible large number of folders that’s important. So what I’ve come up with is a script that will scan though every folder in the public folder tree on a server and then create a feed that has a post for each new item in each public folder within the whole public folder tree (where theres are replica available). The one problem with this script is it doesn’t really respect permissions so if you have folders that have information in them that is supposed to be restricted you might want to include some if statements so these folders are skipped. This script use WebDAV to query each p

Creating a RSS feed of an Exchange 2007 Mailbox Folder using Exchange Web Services C# and Powershell

I ’m a real fan of RSS it tends to by my preferred method of reading and aggregating information so I though I’d see how easy it would be to generate a RSS feed using the new Exchange Web Services in Exchange 2007. Fortunately the XmlTextWriter class in .NET makes creating XML very easy when compared with the old XMLDOM Com object. To create a feed of items from a folder using EWS you need to first use a FindItem request which will return a list of items in a folder I used a restriction so it would only return items that where less then 7 days old. One of the restictions with the FindItem operation as stated in the SDK “ FindItem returns only the first 512 bytes of any streamable property. For Unicode, it returns the first 255 characters by using a null-terminated Unicode string. It does not return any of the message body formats or the recipient lists. FindItem will return a recipient summary. You can use the GetItem Operation to get the details of an item.” ref This means you would
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.