Archive for the ‘Exchange Server’ Category

Cannot Delete Folder in Outlook if Duplicate Exists in Deleted Items

September 29th, 2011 by Paul Sterley | No Comments | Filed in Exchange Server, In the Exchange Box, Workstation OS

I have a customer that routinely deletes sub-folders in their Outlook mailboxes.
These subfolders get re-recreated programmatically later.
They’re using Outlook 2003, and up until a few days ago, were on Exchange 2003.
We just upgraded to Exchange 2010 on the back end.

After the upgrade, the customer is having trouble deleting sub-folders. We press the delete key on the keyboard, or right-click and choose to delete, and nothing happens.
There is no error message in the Application Log to give us a clue about what is happening.

I have seen this kind of problem before, but it only happened when deleting “system folders”, for example when we somehow got a duplicate Calendar folder, or when we want to delete the “Sync Issues” folder.
In those cases, the solution was to open Outlook Web Access and delete the folder from there. So I tried it with this scenario.

Surprisingly, Outlook Web Access delivered a useful error message! Basically, it told me that it could not delete the folder because there was already a folder with that name in the Deleted Items folder.
I went and looked, and found not only a folder with that same name, but also a bunch of others with incrementally numbered names, like Folder, Folder1, Folder2, Folder3, etc.

My conclusion:
With Exchange 2003, if you delete a folder, and there is already a folder with that name in the Deleted Items folder, Exchange simply adds a number to the folder name as it drops the folder into Deleted Items.
With Exchange 2010, it fails to delete the folder and, with the Outlook 2003 client at least, fails to notify you about why it cannot delete the folder.

So it seems that Exchange 2010 is slightly retarded in this aspect. WTF, Microsoft?!

Additional: I have tested this scenario with Exchange 2007 and Outlook 2007. It adds a number to the end of the folder, no problem. Unfortunately, I do not have a test platform with Exchange 2010 and Outlook 2010 available. However, I will have such a test platform in the near future. I will test this when that becomes available, and update the article with the results.

Tags: , ,

Public Folders Missing from Exch 2007/2010 after Removing Exch 2003 Server

June 3rd, 2011 by Paul Sterley | 23 Comments | Filed in Exchange Server, In the Exchange Box

You completed your migration. Everything was working great. You did some cleanup in ADSIEdit. A while later, after a reboot, your Public Folders went missing! The event log errors look something like this: MapiExceptionADPropertyError: Unable to mount database. (hr=0×80004005, ec=2418)

Well, if you were dumb like this guy and myself, you did this:
“It started when I removed the Exchange 2003 First Adminstrative Group from Active Directory with adsiedit. The old EX2003 server was not in the Old Administrative Group, but Ex2007 public folders had a dependency on a “Folders Hierarchies” object in the old Administrative Group.”

Here are the instructions to fix it:
Open ADSI Edit, connect to a Domain Controller, change the context to Configuration.

Create the Folder Hierarchies under the Exchange Administrative Group
Navigate to Configuration ⇒ Services ⇒ Microsoft Exchange ⇒ [your organization] ⇒Administrative Groups ⇒ [your administrative group]
Right click on and select New Object
Select msExchContainer as class and click Next
Enter the following as value: Folder Hierarchies, click Next, Finish

Create the Public Folders Tree Object
Right click Folder Hierarchies and select New Object
Select msExchPFTree as class, click Next
Enter the following as value: Public Folders, click Next
Click on More Attributes button, select msExchPFTreeType and set the value to 1
Click OK, Finish

Populate the msExchOwningPFTreeBL attribute object of the PF Store
(Tell the Public Folder database where to find the new folder hierarchy you just created)
Double click the newly created “Public Folders” object
Double click distinguishedName, copy the value to the clipboard, click Cancel
Exchange 2007: open properties of Configuration ⇒ Services ⇒ Microsoft Exchange ⇒ [your organization] ⇒ Administrative Groups ⇒ [your administrative group]⇒ Servers ⇒ [your server] ⇒ Information Store
Exchange 2010: open properties of Configuration ⇒ Services ⇒ Microsoft Exchange ⇒ [your organization] ⇒ Administrative Groups ⇒ [your administrative group] ⇒ Databases ⇒ [your Public Folder database]
Double click the msExchOwningPFTree attribute, paste the value that was copied to the clipboard in step 2
Click OK twice

Here’s a screen shot of where to find the attribute. Click for full size image.

Try to mount the Store
Restart the Microsoft Exchange System Attendant Service
Open Exchange System Manager and try to mount the PF store
It is usually found under Organization Configuration ⇒ Mailbox ⇒ Database Management tab.

There are some almost-correct instructions out there for this problem:
You may find similar instructions telling you to use “msExchPublicFolderTreeContainer” for the class of the Folder Hierarchies object. I followed those instructions the first time around, and as a result the Public Folder database would mount, but when I opened the Public Folder Management Console in the Toolbox, I got this error:
Couldn’t find a MAPI public folder tree. It was running the command ‘get-publicfolder -getchildren -identity ‘\’ -server ‘myserver.mydomain.local”
So do yourself a favor and use “msExchContainer” instead. Thanks, James Luo, you’re the man!

Remove “Copy: ” from Outlook Calendar Items

June 2nd, 2011 by Paul Sterley | No Comments | Filed in Exchange Server, Not in the Exchange Box, Workstation OS

This post is copied from here. Thanks, Josh!

Recently I changed over to a new company (sort of, long story) and had to import all my calendar items onto the new Exchange server. Actually, I wanted all my email, tasks, and everything to move, so I exported my entire mailbox as a PST and then opened it while connected to the new server and moved everything from the PST onto the server. It was all fine until I noticed all my calender items all now begin with “Copy: ” Most annoying. So I wrote a VBA script to take the word “Copy: ” out of the beginning of all my appointments. Actually, the concepts behind the script are useful anytime you’d want to loop through a list of Outlook items. Here’s the script:

Sub deleteCopyText()
Dim counter As Integer
Dim objOL As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim colCal As Outlook.Items
Dim objAppt As Outlook.AppointmentItem
Set objOL = CreateObject(“Outlook.Application”)
Set objNS = objOL.GetNamespace(“MAPI”)
Set colCal = objNS.GetDefaultFolder(olFolderCalendar).Items
counter = 0
For Each objAppt In colCal
If Left(objAppt.Subject, 6) = “Copy: ” Then
‘MsgBox objAppt.Subject
objAppt.Subject = Replace(objAppt.Subject, “Copy: “, “”)
‘MsgBox objAppt.Subject
objAppt.Save
counter = counter + 1
End If
Next
MsgBox “Complete. ” & counter & ” items renamed.”

End Sub

This script will ignore anything that does not begin with “Copy: “. You can uncomment out the msgbox lines if you want to see what change it is going to make one by one. To run it, open Outlook. Pres alt+F11 – this will get you into the VBA environment. Right click Project1 in the Project window and select “Insert -> New Module” Paste the code above (from sub deleteCopyText() to end sub()). Press F5 to run the script or if you want to be cautious, press F8 and it will run it one line at a time (press F8 repeatedly until you are satisfied it is doing what you think it should, then press F5 to run the script without stopping). You probably won’t want to run the script with the msgbox lines uncommented if you have lots of calendar items, otherwise it will pop up two message boxes that you have to clear for each calendar item it is going to change. If that happens to you, press Ctrl+Break to stop the script. You could also comment out objAppt.Save if you just wanted to run the script to see how many calendar items it is going to change (no changes will actually be made).

POSTED BY JOSH AT 9:55 AM on MONDAY, DECEMBER 07, 2009

There is no valid SMTP Transport Layer Security (TLS) certificate for the FQDN of server.domain.com.

March 3rd, 2011 by Paul Sterley | No Comments | Filed in Exchange Server, In the Windows Box, Windows Server

You may received the following event in the Application log:

Application log generated Error Event 12016 on server.domain.local
Log: Application
Type: Error
Event: 12016
Source: MSExchangeTransport
Category: TransportService
Computer: server.domain.local
Description: There is no valid SMTP Transport Layer Security (TLS) certificate for the FQDN of server.domain.com. The existing certificate for that FQDN has expired. The continued use of that FQDN will cause mail flow problems. A new certificate that contains the FQDN of server.domain.com should be installed on this server as soon as possible. You can create a new certificate by using the New-ExchangeCertificate task.

If you are not using TLS, you might not notice any ill effects of this error, but it’s annoying anyway.

You’re probably confused as to why you’re seeing this error, since you have a current, valid SSL certificate.
If so, there’s a good chance you used IIS to get your new certificate, and Exchange simply doesn’t know about it.
All you have to do to fix this is run a simple command line to tell Exchange to use your new certificate.

Before you can do this, you need to know the “thumbprint” of the certificate you’re going to replace the expired one with.

Here’s how to find it:
1. Run “MMC”.
2. Add the Certificates snap-in to your MMC console. Choose “Computer Account” and “Local Computer” when adding the snap-in.
3. Navigate to where your certificate is in the Certificates snap-in.
4. Double-click to view your certificate.
5. Click the Detail tab and scroll down the list of fields until you find Thumbprint (usually near the bottom).
6. Open Notepad, and paste the following command line below into it:
enable-exchangecertificate -thumbprint [your thumbprint here] -services SMTP
7. Copy the thumbprint’s hexadecimal sequence into the command line, replacing “[your thumbprint here]“, and remove the spaces.
8. Open Exchange Management Shell and paste the adjusted command line into the powershell.
9. When prompted, press Y to confirm the replacement of your expired certificate.
10. Make yourself a note on how to do this next time the cert expires.

Note: You could make yourself a self-signed certificate WAY into the future and use that one to avoid messing with this on a regular basis.

Tags: , ,

MS DNS Service splatters its port usage all over the server

December 22nd, 2010 by Paul Sterley | No Comments | Filed in Exchange Server, In the Windows Box, Not in the Exchange Box, Windows Server

This kind of thing has come up for me a couple of times in the last month so I thought I’d post about it.

Basically, what’s going on is that Microsoft’s DNS implementation has gotten port-happy recently, interfering with other services. For example, Internet Authentication Service starts and then stops again because port 1645 is already in use. However, if you stop the MS DNS Server servcie, then start IAS, it stays running. Then you can start DNS again and all is well until the next reboot.

More recently, I started getting this error:

Log: Application
Type: Error
Event: 3015
Agent Time: 7:12:18 pm 22-Dec-10
Event Time: 3:12:18 am 23-Dec-10 UTC
Source: Server ActiveSync
Category: None
Username: N/A
Computer: [removed]
Description: IP-based AUTD failed to initialize because the processing of notifications could not be setup. Error code [0x80004005]. Verify that no other applications are currently bound to UDP port [2883], or try specifying a different port number.

Once again, reserving a port was the answer. This time it was port 2883, for the AUTD service.

I’ve created a .reg file with a bunch of reserved ports for services that have been reported to have conflicts due to this problem.

Here’s the Technet blog post where I got the list of ports from.

Here’s the .reg file:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
“ReservedPorts”=hex(7):31,00,30,00,38,00,30,00,2d,00,31,00,30,00,38,00,30,00,\
00,00,31,00,34,00,33,00,33,00,2d,00,31,00,34,00,33,00,34,00,00,00,31,00,36,\
00,34,00,35,00,2d,00,31,00,36,00,34,00,36,00,00,00,31,00,37,00,30,00,31,00,\
2d,00,31,00,37,00,30,00,31,00,00,00,31,00,37,00,32,00,30,00,2d,00,31,00,37,\
00,32,00,30,00,00,00,31,00,37,00,34,00,35,00,2d,00,31,00,37,00,34,00,35,00,\
00,00,31,00,38,00,30,00,31,00,2d,00,31,00,38,00,30,00,31,00,00,00,31,00,38,\
00,31,00,32,00,2d,00,31,00,38,00,31,00,33,00,00,00,32,00,38,00,38,00,33,00,\
2d,00,32,00,38,00,38,00,33,00,00,00,33,00,33,00,34,00,33,00,2d,00,33,00,33,\
00,34,00,33,00,00,00,34,00,35,00,30,00,30,00,2d,00,34,00,35,00,30,00,30,00,\
00,00,00,00