Skip to main content

Posts

Showing posts from January, 2006

Script to Check an Exchange 2003 Server against the OVAL vulnerabilities definitions file

A few weeks ago while looking for some information on something else I was working on I came across the Open Vulnerability and Assessment Language (OVAL) website . Now these’s type of certification organization are nothing new and there are many around we have one locally in Australia based at the Queensland University . The big difference with this site is that they are publishing the vulnerabilities in a XML file in a format that you can basically plug straight into a testing tool. They have a sample test tool already which looks good but didn’t really give the sort of result I was after. With the schema that is used this XML file really lends itself to scripting so I thought I’d try to put together a script that would first separated out all the Exchange specific tests within the OVAL definition file and then perform the tests using the appropriate API via a script. This turned out to prove challenging and the script I ended up with was on the large side and covered a gamete of dif

Creating Summary Emails for Inbox, Sub or Public Folders

This is one script that has a number of different uses the basic premise of this script is that it will produce a summary email of all the email that exists in a folder for a certain time period. For example if you have a public folder where mail may be arriving in and you want people to receive a summary once a day of all the email that was received in this folder for the past 24 hours or . I also use this for different listservs I subscribe to where I have some rules moving email from different lists to a certain folders than I run the script to summarize mail that was received in that folder over the last 24 hours . The summary includes who the message was from what time it was received and also an Oulook link so if you do want to view the mail you can click on the link and it will take me to the appropriate message in Outlook. The script works by querying a folder using exoledb for messages that arrived after a certain date. Because Exchange stores the received time in UTC there’s

Adding the Creator of Calendar appointments to appointments that already exist in a public calendar

A while ago I posted this event sink that can be used in a public calendar folder that will add the person who created the appointment so that it is visible when the appointment is looked at in Outlook or OWA. Being an event sink this will only have an effect on any new appointments that where added to the calendar. Somebody asked this week about modifying existing appointments in a calendar. This can be done using the same type of code and also including a query for a specific date range that will create a recordset of all the items in the calendar and then iterate though that recordset and add the creator to the location field of the appointment if it doesn’t already exist. Because this script use Exoledb it must be run locally on the server where the public folder is located. The date range in the query is set to modify all appointments between December 2005 and December 2006 and will affect both normal and recurring appointments. I’ve put a downloadable version of the script here

Script to report on the IMF update Version

Now that IMF updates are available though Microsoft update see and the updates should start getting more regular I wanted something that would tell me what version of the IMF update my servers where running. After reading KB907747 the way to do this seemed to be to write a script that would query a few keys in the registry on each of the servers. “The existing active version of the .dat file that is currently installed on the computer is recorded under the following registry subkey: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Exchange Server 2003\SP3 For example, after you install the IMF-KB907747-2005.12.14-x86.exe update, the registry entry is similar to the following: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Updates\Exchange Server 2003\SP3\KB907747 This registry entry is verified every time that an update is offered for installation. If an update is successfully installed, the registry entry is updated.” And from the Exchange Team Blog “Over the course of the regular update cy

Exporting Active Directory users contacts and the Exchange GAL to a vCard

I’ve written a bit about vCards in the past mostly these where import scripts but one of the other ways you can use vCards with CDOEX is if you want to export active directory users or contacts to be used in another system. Basically with CDOEX you can use Iperson to create or modify Active directory users or contacts see the Exchange SDK for samples. You can also go the same way and use CDOEX and the GetvCardStream stream method to export an Active Directory user or contact to a vcard. eg set iper = createobject("CDO.Person") iper.datasource.open "LDAP://userdn" Set strm = iper.GetvCardStream strm.savetofile "c:\exp.vcf" So if we expand out this idea a bit say I want to export the Exchange GAL to use in the palm desktop I can use an ADSI query to return all the distinguishedName’s of the user’s in the Exchange GAL and then use CDOEX and Iperson to connect to each object and use GetvCardStream method to get the Vcard text stream and create a vcard that co
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.