Tag Archives: email

Exchange 2003 to 2010

While uninstalling Exchange 2003 I was getting the error “you cannot remove a server that is a target bridgehead for a routing group connector. This server is a target bridgehead for the following connections”.I deleted the connector on the Exchange 2003 server, but I still received the uninstall error. This post clued me in that I should be looking for something on the new Exchange 2010 server, and after performing a Remove-RoutingGroupConnectorin the Exchange console I was able to uninstall (though just be sure to have that Exchange 2003 ISO laying about).

Update:After only having the stat tracker running for two days on my site, this post has turned up as being disproportionately popular so I figured I’d post another note on my uninstall experience with this Exchange 2003 server: I ended up having to manually uninstall it in this case and then had to remove entries from active directory using ADSI edit that were subsequently causing errors on the new Exchange server.  I know the post I relied on over on Microsoft’s forum had follow-ups that said to absolutely not do that, but it was the only thing that worked.  Use at your own risk, of course.

I believe, if I remember correclty, that  the issue that led to this result was the fact that I just couldn’t remove the stores from the 2003 server.

Exchange 2010 Upgrade Notes

I’ve upgraded our Exchange 2007 setup to Exchange 2010 and two irksome issues cropped up that sponged up a great deal of my time:

  • First, when I was moving users (aka ‘local move’) in a remote domain from the Exchange 2007 server to the Exchange 2010 server I was receiving the ‘insuff_access_rights’ error and I was unable to move the mailbox*.  Eventually I did have to do the ’include inheritable permissions’ checkbox on most of the users, but since that didn’t work right away I investigated quite a bit more before finding that the permissions for various ‘Exchange’ entries at the root of the remote domain within active directory users and computers were “goofed”.  Things went more smoothly after setting the matching entries to (about) the same permissions as the ones at the host domain.
  • I couldn’t uninstall Exchange 2007 since it was hosting unremovable folders on the public folder database (‘Internet Newsgroups’, etc.).  I tried to do things the right way, but wound up resorting to the ADSI edit tip here.

*By the way, I liked the ‘cached move’ method in Exchange 2010, but why can I clear out the flags for successful moves in the GUI, but I have to resort to a painful command line method if it fails? (Which, it failed for me a lot while working on it).

Power Detection

It’s rather rudimentary, but I do not get a proper notification when we lose power.  Part of this was being spoiled for my first several years that I worked here because there was always someone at work, either an off-shift supervisor or a security guard, who would call me to let me know if power had been lost.  Another part, though, was simply overcoming the technical hurdles of getting the APC UPS units to get a notification through to me via SNMP.  My workaround thus far was to rely on a particular error the key access system for the doors would send me when there was a power hiccup, but after the last brief outage I determined that relying on that fallback measure wasn’t very reliable and that I should set about getting the SNMP messages to work.

The first step was to set up the antiquated network management cards for the APC units.  This was rather simple and just entailed pointing their SNMP settings at the HP Systems Insight Manager setup that I use.  (As an aside, I should point out now that my older APC card had a limit of eight characters for the password but I didn’t notice it until I guessed my way back onto the unit).  I then had to compile the MIB files, but when I tried to import the CFG file into Insight I was getting errors over the lines that had a severity of SEVERE.  After  searching around I came across this post that clued me in and after changing all the ‘SEVERE’s to ‘WARNING’s the CFG successfully imported.  This wasn’t a big deal to me since I planned on setting Insight up to e-mail me WARNING messages as well anyway. (Just looking within Insight it would appear that the error is being generated because there is no ‘SEVERE’ setting within the package.  I would then theorize that swapping out all the ‘SEVERE’s for ‘CRITICAL’s would also work.)

I then wanted to set Insight up to send me an e-mail AND a cellular text message.  After looking around I’d found that I could text my T-Mobile phone by sending an e-mail to <phone number>@tmomail.net.  On older versions of Exchange I remember how to allow a specific system to anonymous relay, but I couldn’t find an equivalent setting in Exchange 2007.  I’d set up a separate connector specific to the Insight server, but it turns out that the relay settings need to be set within the Exchange Management Shell.  After doing that I was getting my text messages from the APC UPS units, but the only issue left to resolve is to figure out how to get the texts in a more consistent fashion since I would receive some texts right away, and others upwards of an hour after the event that generated it.  Long term I might have to rely on a pay-for service, although an even pricier out-of-band method that removes the e-mail server from the loop is even more appealing.

Exchange 2007 Mailbox Size Limit Alerts

I’d grown spoiled with my MOM pack for Exchange 2003 since I was able to tweak it to alert me (the admin) when a user’s mailbox was being issued size limit warnings.  Several times I was able to catch users stuck with items tucked away out of their view, or the storage of large files that’s better suited to the file server.  After moving to Exchange 2007 though Microsoft removed the event log entry that I used to trigger the MOM condition.  My fix was to create a script that would run on the same schedule as the one used to issue mailbox size warnings.  After combing a variety of pages I came up with the following imperfect, but sufficient script:

function send-email($SmtpServer,$From,$To,$subject,$Body){
$smtp = new-object system.net.mail.smtpClient($SmtpServer)
$mail = new-object System.Net.Mail.MailMessage
$mail.From = $From
$mail.To.Add($To)
$mail.Subject = $subject
$mail.Body = $Body
#$mail.IsBodyHtml = $true
$smtp.Send($mail)
}

get-mailboxstatistics|out-file mstat.txt
get-childitem mstat.txt|select-string -pattern “Issue”|out-file results.txt
$File=get-childitem “results.txt”
$FileContent=get-content “results.txt”
[string]$formattedLength = $file.Length
if($file.Length -gt 5){
send-email email.server.com “server@example.com” “admin@example.com” “Mailbox size alert” $FileContent
}

I apologize for the lack of comments, but what I’m doing is snagging the stats, searching for the word ‘Issue’ to see if a warning or some such was issued, then checking the resulting file size of the search and if it’s oversized (i.e. actually contains something) it’s emailed off to the desired contact.

(UPDATE: this e-mail size alert works for Exchange 2010 as well)

(UPDATE 12/6/2013: this e-mail size alert does not work for Exchange 2013.  I’m working to brew up a solution.)

Find the Mailbox

I was getting two errors in the log along these lines on my Exchange 2007 server every thirty minutes:

Unable to update Mailbox SD in the DS. Mailbox Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. Error Code 0x80070005

I tried the items like this that instruct on how to find the troublesome mailbox (adfind, etc), but nothing would turn up.

At the same time I was looking up how to purge a disconnected mailbox* and I came across this page.  Putting two and two together, I put this line into the Exchange console:

Get-MailboxStatistics | where-object {$_.MailboxGuid -ne $null} | Select DisplayName,MailboxGUID

I was then able to hunt through the output to find the naughty GUIDs and reset the permissions.  Luckily our environment doesn’t have too many mailboxes so I was able to just eyeball it.  I’m sure that there’s a different way to craft the command so that it can just kick out the desired desired mailbox instead of a complete list, but it wasn’t worth the time to find that for our environment.

*Yet another item that was in the GUI of Exchange 2003 that you need obscure commands for in Exchange 2007.