Thursday, September 08, 2005

Event Scripting in Exchange

I recently started looking at migrating several mailboxes from an Exchange 5.5 server to Exchange 2000 that are "Script Enabled". Server side scripts can be added to individual mailboxes or public folders which can be triggered based upon a number of different types of events.

The problem is there doesn't seem to be much documentation available on how one can migrate these scripts to make certain they remain intact when the mailbox is moved. I've found the following Q articles which seem to be a good starting point:

Q281269 How to Move Mailboxes That Have Events Scripts Installed on the Inbox
Q180121 Agents Tab is Missing From Folder Properties

Wednesday, August 03, 2005

Blackberry IM

This is a little off topic but for those of you that have Blackberry devices, Blackberry is now offering a free instant messaging application. The application allows you to have a conversation pin to pin and is very well written. You can check it out at:

http://www.blackberry.com/messenger/entry.do

Tuesday, July 26, 2005

MaxiVista



Not really Exchange related but I thought I'd write a quick overview of a product I'm using that allows me to display performance monitor graphs on notebook systems used as secondary displays. This product extends your primary desktop display to a notebook system over the network via IP. It works great if you have a spare notebook and need more display space. You can also toggle the extended display off and have full access to your notebook while still using the keyboard and mouse off of the primary system. This is a nice feature if you need to use the notebook as a test system.

Monday, May 23, 2005

Java Sort Script for Disk Space Report

I was recently asked if it would be possible to add some type of sorting feature to the daily disk report script I created and have now decided to tackle the request! The easiest way to sort HTML based tables is to use some type call request to a Java based script.

Click on the title of this post for additional info on the script and how to implement it.

Friday, May 20, 2005

Out of Office Not Replying

In a previous post I discussed the use of MDBVUE32.EXE found on the Exchange 2000 CD. I recently can across an issue where a mailbox wasn't sending out automated "Out of Office" replies and the process using MDBVUE32 to remove corrupted rules didn't solve the issue. What to do?

After much searching the problem was actually an easy one. The mailbox was sitting at over 1 gig of consumed space with a 50 meg storage limit in which prohibit send was enabled.

As a heads up, check your storage limits on any send related issue and confirm that the prohibit send option hasn't been activated!

Monday, May 09, 2005

Perfmon Counters for Exchange 2000

Recently I was searching for counters that should be watched in Perform as part of a proactive monitoring environment for our Exchange 2000 systems. I didn't find much available from Microsoft but the user community seems pretty consistent with watching the following:

Categorizer Queue Length
Current Messages in Local Delivery
Local Queue Length
Local Retry Queue Length
Remote Queue Length
Remote Retry Queue Length

My initial tests agree!

Thursday, April 07, 2005

Blat

Blat is a command line email tool (sending mail via smtp), written for Windows. Blat is ideally suited for inclusion in scripts or automated runs to add email capability to your processes. Blat can be found at http://www.blat.net

Uptime Server Script

The following script was originally developed by Rick Campbell in 2003 and queries AD for all servers within a domain. It takes the results of the query and saves them to a file. Once this file is created, it then uses the file to pass server names to the UPLOAD.EXE application using a -S parameter to display detailed up time information for the servers. Each result is stored in a separate file labeled the same as the server name. The script then queries each of these files for the number of days the server has been online and adds them to an HTML file.

I modified this script to remove the AD query portion so I could manually control the servers included in the report.

@Echo OFF
@If not "%OS%"=="Windows_NT" Goto DOSEXIT
Title Uptimes

::
:: UPTIMES_HTML.BAT
:: Written 04/25/03 by Rick Campbell
:: Modified my Michael Henderson 04/03/2005
::
:: This script generates an HTML file that has the uptimes For all the member
:: servers and domain controllers in the domain. It also creates history files
:: of each server that can be clicked on from the HTML file.
::
:: This script uses the UPTIME.EXE program from the Win2k Resource kit and a
:: third party tool called NETVIEW.EXE from http://www.optimumx.com/download
:: as well as 1 small jpg file for the icon used in the html output.
::

Setlocal
Set SCRIPTNAME=%~n0
Set SCRIPTPATH=%~f0

Set ServersFile=servers.txt
Set ServersTemp=svrs.txt
Set HTMLfile=\\gnsmsgmon\reporting$\uptime.html
Set OldHTMLfile=\\gnsmsgmon\reporting$\uptime_old.html

Set /a ServerCount=0

Echo Getting Uptimes For all domain servers. Please wait...

:: Dump all the NT/2K servers/controllers to text file.
:: netview /nts /pdc /bdc /b /domain:corpmsg > %ServersTemp%

:: Now sort the file in aphabetic order based on computer name
:: sort %ServersTemp% /+3 /output %ServersFile%

:: Backup yesterday''s file
:: Del %OldHTMLfile% > nul
:: Ren %HTMLfile% %OldHTMLfile% > nul

:: Create the HTML file header
Echo ^^^ > %HTMLfile%
Echo BODY { >> %HTMLfile%
Echo font-size:10 pt; >> %HTMLfile%
Echo font-family: Verdana; >> %HTMLfile%
Echo } >> %HTMLfile%
Echo H3 { >> %HTMLfile%
Echo font-size:12 pt; >> %HTMLfile%
Echo font-family: Verdana; >> %HTMLfile%
Echo } >> %HTMLfile%
Echo TH { >> %HTMLfile%
Echo font-family : Verdana; >> %HTMLfile%
Echo font-size : 12; >> %HTMLfile%
Echo } >> %HTMLfile%
Echo TD { >> %HTMLfile%
Echo font-family : Verdana; >> %HTMLfile%
Echo font-size : 12; >> %HTMLfile%
Echo } >> %HTMLfile%
Echo ^^ >> %HTMLfile%
Echo ^^ >> %HTMLfile%

Echo ^Server Uptimes/Info For Domain: CORPMSG ^ >> %HTMLfile%

Echo Legend: ^ >> %HTMLfile%
Echo ^ ^ >> %HTMLfile%
Echo ^ Up For 0 - 5 days ^ >> %HTMLfile%
Echo ^ Up For 5 - 10 days ^ >> %HTMLfile%
Echo ^ Up For 10 - 50 days ^ >> %HTMLfile%
Echo ^ Up For 50 - 100 days ^ >> %HTMLfile%
Echo ^ Up More than 100 days^ >> %HTMLfile%
Echo ^^^ >> %HTMLfile%

Echo ^ >> %HTMLfile%
Echo ^ Server^ >> %HTMLfile%
Echo ^ Uptime^ >> %HTMLfile%

:: Now get the uptime For each server and write to HTML file.
For /f %%i in (%ServersFile%) do (Call :write_uptime %%i)

Echo ^Total number of systems: ^%ServerCount%^^ >> %HTMLfile%
::Echo ^Yesterday''s ^Uptimes^^ >> %HTMLfile%
Echo ^^Scan Date %Date% - At %Time% >> %HTMLfile%
Echo ^^ >> %HTMLfile%

:: Delete the temporary and log files.
:: Del svrs.txt > nul
:: Del servers.txt > nul
Endlocal & Goto :EOF

:WRITE_UPTIME
Setlocal
Set server=%1
Set daysup=-1

uptime %server% > nul

If %errorlevel%==0 (
:: Determine and write the number of days system has been up
For /f "tokens=6 delims= " %%i in ('uptime.exe %server% ^ Find "up for:"') do (
Set daysup=%%i
Echo %server% has been up For %%i days
)
)

:: Write system name as a link pointing to the uptime history file
Echo ^ ^^ >> %HTMLfile%
Echo ^^%server:~2%^ >> %HTMLfile%

Call :day_color %daysup%

Echo ^^ >> %HTMLfile%

:: Generate uptime history file and diagnostics report.
uptime.exe %server% /s > file:////servername/sharename$/files/%server:~2%.txt

Endlocal & Set /a ServerCount+=1 & Goto :EOF

:DAY_COLOR
:: Write the number of days the system has been up and determine the
:: Color to use For the amount of uptime, then write this to the file.
Setlocal
Set days=%1
Set daycolor=green
Set width=%days%

If %days% GTR 5 Set daycolor=blue
If %days% GTR 10 Set daycolor=orange
If %days% GTR 50 Set daycolor=yellow
If %days% GTR 100 Set daycolor=red

If %days%==-1 (
Set days=0
Set width=0
Set daycolor=Black
)

Echo ^ %days% day(s)^ >> %HTMLfile%
Echo ^ ^ >> %HTMLfile%
Endlocal & Goto :EOF

:DOSEXIT
Echo This script requires Windows NT/2k/XP/2k3 to run.
Goto :EOF

Wednesday, March 16, 2005

Perl Disk Utilization Report - Transaction Logs

Here is a Perl based subroutine I created which you can add to the Disk Utilization report script giving you an additional column listing the total amount (in gig) consumed by transaction logs in your mdbdata directory.

# Figuring out the total file size for log files located in the priv directory
use File::Find;
$logByteCount=0;
$logdir= "net use t: \\\\@Drivearray[0]\\e\$ >NULL";
system $logdir;
$logpath="\\\\@Drivearray[0]\\@Drivearray[2]\\Program Files\\Exchsrvr\\MDBDATA\\"; print "Scanning $logpath\n";
find(\&log, "t:\\program files\\exchsrvr\\mdbdata");
$gigCount=$logByteCount / 1023741824;
$gigCount=sprintf("%5.2f\n", "$gigCount");
$logdirdelete= "net use t: /d >NULL";
system $logdirdelete;
$nulldelete="del NULL";
system $nulldelete;
sub log { if ((/\.log$/) ){ my ($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, $therest) = stat($_) or die "Unable to stat $_\n";
$logByteCount += $size;

}
}

Monday, March 14, 2005

Microsoft to Buy Groove Networks

Just came across this. The founder of Groove Networks (Ray Ozzie) also created Lotus Notes. Ozzie is going to report to Bill Gates. Though most of the article talks about Groove's integration into the Longhorn build, I look at this as good for Exchange.

Thursday, March 03, 2005

Exclude a Single Mailbox From Mailbox Manager

If you have a need to exclude the use of the global policy mailbox manager service from a single mailbox you can add the attribute through ADSI Edit through the following process:


1. Start ADSI Edit. To do so, click Start, point to Programs, point to Windows 2000 Support Tools, click Tools, and then click ADSI Edit.
2. Expand the domain naming context, and then locate the user that you want to exclude from Mailbox Manager.
3. Right-click the user, and then click Properties.
4. In the Select a property to view drop-down box, select msExchPoliciesExcluded.
5. In the Edit Attribute space, type the following attribute value:
{3B6813EC-CE89-42BA-9442-D87D4AA30DBC} NOTE: Make sure that you include the braces ({}) characters.
6. Click the Add button.
7. Click the Apply button or the OK button.Once saved, the change takes effect shortly. The Recipient Update Service must process the object before the mailbox is excluded from Mailbox Manager.

Thursday, February 24, 2005

Extending Calendar Look up in Outlook

This seems to be a common issue so I thought I'd jot down the quick fix... Outlook defaults the number of items you can view in your calendar to two months from the current date. Use the following process to update Outlook to additional months beyond two:

1. Select Tools, Options
2. Calendar Options
3. Free/Busy Options
4. Then update the Publish field number from 2 to how many months out is required.

Removing Corrupt Server Side Rules

I followed this procedure to remove corrupted server side rules that were preventing "Out of Office" automated replies from sending to internal recipients:

1. Find mdbvu32.exe in the \support\utils\i386 directory on the base Exchange 2000 cd.
2. Run mdbvu32.exe.
3. Click OK to clear the first window that pops up.
4. Make sure that your profile is selected in the Choose Profile window and click OK.
5. Click on the MDB menu option.
6. Click on the OpenMessageStore option.
7. Make sure that "Mailbox- [user's full name]" is selected and click on Open.
8. Click on the MDB menu option again.
9. Click Open Root Folder.
10. In the Child Folders box - double click on "Top of Information Store".
11. In the next Child Folders box - double click on "Inbox".
12. Look in the Associated Messages in Fld box. All of your rules are in this box.
13. Once you find the rule that you want to delete then close the properties for that rule.
14. On the MAPI_FOLDER page make sure that the rule that you want to delete is still highlighted.
15. In the "Operations available (select operation, then push Call Function button)" text box, push the drop down button to reveal the list of functions.
16. Scroll down the list of functions until you see "lpFld -> deleteMessages() (ON SELECTED MSGS)" and then click on it to select it.
17. Next press the Call Function button. This will delete the rule that you selected.
18. Press the Close button to exit the MAPI_FOLDER window.
19. Press Close again to exit the next window.
20. Press Close again to exit the last window.
21. Click on the MDB menu option.
22. Click Store Logoff. Then click OK and OK again.
23. Click Session and then click on Exit.

Thursday, October 14, 2004

The 12 Commandments of Exchange Deployments

Brien Posey has written another good article over at SearchExchange.com, this one is covering The 12 Commandments of Exchange Deployments

"Rolling out an Exchange Server deployment can be a complicated task. Need some help? I have put together my list of 12 commandments to follow when you find yourself heading an Exchange 2000 or 2003 deployment"

Wednesday, October 13, 2004

Q Article 284204

If you're having a problem trying to track down an error code for an NDR, do a quick Google search for Q article 284204. This Microsoft technical article lists a number of codes, their possible cause, and troubleshooting options.

Friday, October 08, 2004

Quest Software - Quest MessageStats

Quest has just released the latest update to their Microsoft Exchange reporting product. Last fall I evaluated a number of these products and found the Quest application to be the most feature rich. More info can be found at:

http://wm.quest.com/products/messagestats/

Wednesday, October 06, 2004

Microsoft Lookout v1.2

An addin to Outlook to quickly search all of your e-mail, contacts, calendar, and filesystem.

Overview
Lookout is lightning-fast search for your e-mail, files, and desktop integrated with Microsoft Outlook™. Built on top of a powerful search engine, Lookout is the only personal search engine that can search all of your e-mail from directly within Outlook - in seconds...

You can use Lookout to search:
* E-mail messages
* Contacts, calendar, notes, tasks, etc.
* Data from exchange, POP, IMAP, PST files, Public Folders
* Files on your computer or other computers

Just enter your search and press enter. Results are instant. Lookout will find your search terms hiding nearly anywhere in your Outlook mailbox - subjects, bodies, phone numbers, addresses, etc.

System Requirements
* Supported Operating Systems: Windows 2000, Windows Server 2003, Windows XP

* Microsoft Outlook 2000, Outlook XP, or Outlook 2003 must be installed on your computer.

* Microsoft .NET Framework 1.1

Click this link for additional information and to download the addin:

http://www.microsoft.com/downloads/details.aspx?FamilyID=09b835ee-16e5-4961-91b8-2200ba31ea37&displaylang=en

Priv.edb File Size Tracking Through Perl

I've updated the Disk Space Utilization Perl script to add a column which displays file size information for your Exchange private information store. This is nice to use to compare with the disk free space on the server to determine if you're going to have a potential issue if you need to do offline Exchange maintenance. Here is the main subroutine I've added:

# Figuring out the file size for the priv1.edb file
$filename="\\\\@Drivearray[0]\\@Drivearray[2]\\Program Files\\Exchansrvr\\MDBDATA\\priv1.edb";
$edb=0;
$edb=(stat($filename))[7];
$edb1=$edb / 1023741824;
$edb1=sprintf("%5.2f/n", "$edb1");

The full script with the modifications for the edb addition can be downloaded at:

http://webpages.charter.net/mhenderson1/Blogs/PerlDriveSpace.pl

Current constraints in the subroutine limit the tracking of only one .edb file per Exchange server. I may change this in the future if we move to a multiple store standard.

Monday, October 04, 2004

Microsoft Exchange Server Best Practices Analyzer Tool

Here is the link to the recently released Microsoft Exchange Best Practices Analyzer tool. It's a good test to see how your currently installed configuration is performing compared to what Microsoft recommends...

http://www.microsoft.com/exchange/downloads/2003/ExBPA/default.asp

Wednesday, September 29, 2004

Message Tracking Logs Report Script and Database

This link will take you to a reporting solution which allows you to keep track of mailbox sizes, number of messages, total messages, etc... saved to an Access database. This script uses WMI and could be converted to SQL for a more robust (and cheaper) solution for those that have a large installed base of systems. Credit goes to Glen Scales :) Also check out a number of other scripting solutions that Glen has posted on his web log.

http://www.outlookexchange.com/articles/glenscales/mtrackrs.asp