Disable Email Accounts in Exchange

Deleting Mailbox in Exchange Admin Console will delete the attached AD objects!

Always great to find out afterwards – thank you Microsoft. :/

So….to just disable an account:

In the Exchange Management Console, right-click and select disable mailbox

or

in the Exchange Management PowerShell, use the Disable-Mailbox cmdlet:

Disable-Mailbox -Identity {mailboxname} -Confirm:$false

Disabling the mailbox will remove the Exchange attributes from the Active Directory object, which disconnects the mailbox and leaves the Active Directory object intact.

The user account will remain in Active Directory and disconnected mailbox will be purged after retention period passes.

You may also need to change a group’s ownership:

Type in the following command and replace “distribution group” with the actual group whose owner is changing.

[PS] >Set-DistributionGroup "distribution group" –ManagedBy "admin.serviceaccount@whomever.com" -BypassSecurityGroupManagerCheck

Exchange 2003 P2V and drive expansion fix

It’s been a long few weeks.

I Had an Exchange 2003 server whose physical hardware was failing – drive and drive controller errors and the physical disk was running out of space on the system drive. Which happened to be the ONLY drive in the server. Yes I know that the system, log and dbase files should all be on separate drives, but I did not build this machine. And it has been the only Exchange server in the organization for almost six years! So I can’t just shut it down.

I did a P2V (physical to Virtual) conversion using and Acronis Image (VMware kicks as at this by the way) and moved it to my ESX Cluster on my SAN, with the hope of being able to at least add some more space to the existing drive and then add additional hard drives (virtual of course) to split up the log and dbase files onto drives other than the %system’% drive.

The P2V went OK with some minor issues with ‘hidden network’ cards and such causing problems. But I got past that. Following ‘Method 1’ here http://support.microsoft.com/kb/269155 (note that you must not close the command line window after step 2 or you will not see the devices!!).

I also had to re-run the Exchange adprep/domainprep on the Domain controller to fix some messed up AD containers/connectors. I also found that after the adprep that was a reference to on old SBS2000 Exchange server that was no longer on the network (fax service too) and I manually removed those via the ADSIedit.msc. So finally it was at least working again! We, as do most organizations that have been around for a while, have a huge spam/malicious email flood that is continually taxing the server. But that is for another post.

So on to the next MAJOR issue. When I moved the machine to a VM I expanded the one and only drive – C: from 32GB to 40GB before starting and connecting it. This sounds all well and good but that extra 8GB of space just shows up as ‘unallocated’ space in the Windows 2003 Server Disk Manager.
I also did create two other volumes on the datastore that houses that machine for the future moving of the logs and dbase files and attached them to the Server.

So now my Exchange 2003 server has three disks (drives) listed in Disk Manager a C: drive still running out of space (but showing 8GB of ‘unallocated space) and two additional large (30GB) drives (F & G); which I will eventually move my log and dbase files to.

So how to expand the system drive to it’s full available size?! I need to have enough room just to be able to move the dbase and log files.

There are LOADS of articles out there ranging from using DiskPart, using Acronis DiskDirector, using gparted and many others. But all seem extremely complex and with poor success rates according to the very long responses on the posts.

I finally found a SUPER blog post By JJ Clements here that looked VERY promising!

So I gave it a try. My first issue was that (as noted in some of the comments) that I had to run the Dell EXTPART utility in safemode. Kind of a bitch to get into in VMware – you have to be VERY quick with the F8 key!

But I was able to expand the drive to the full 40GB. All would be good and well if this wasn’t an Exchange server.

BUT THEN MY INFORMATION STORES WOULDN’T MOUNT!! ARRGGG!!!

The solution – run a repair on the information stores (as per MS’s article here). I could not however run the offline defrag (step 3 in the MS article) to the local system – I’m still out of space! But I will run that to another drive later. I then restart all services.

BAM!! THE F$*ker works!

Well that’s all in a 15hour day I’m done.

The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete – Cant add Outlook accounts…

How I recently fixed one hell of an Outlook 2007 to Exchange 2003 connection problem.

This occurred on brand new Windows 7 Enterprise AND brand new Windows XP workstations while trying to configure the Outlook clients to connect to our Exchange 2003 server.

The actual error is:
"The connection to Microsoft Exchange is unavailable. Outlook must be online or connected to complete – Cant add Outlook accounts.."

Worse still is that this problem did not occur one every new workstation! Windows XP or Windows 7 – only some random ones.

I checked all network/connectivity parameters I could – DNS, LDAP, RPC, TCP/IP etc., and otherwise checked routing and name resolution ad nauseum. And all checked out.
I had this problem a year or so ago but could not find any of my notes! Aggravating to no end. So I swore I would make sure to document my fix when I found one.
So Google here I come….

One of the first things I did then was this:
http://support.microsoft.com/kb/913843/en-us

I checked that the ‘Attendant’ service was running on Exchange; it has been for a few years.

And virtually everything mentioned in every article I could find – 5 days of searching and hundreds of pages!!
Like:
http://social.technet.microsoft.com/Forums/en-US/exchangesvrclients/thread/44a24ec6-33b5-4b66-9fdb-2318b4874fbc

and

http://social.technet.microsoft.com/Forums/en-US/exchangesvrclients/thread/1227b956-c533-4c08-b56d-150ad8486b4c

I also tried importing the Outlook registry keys from machines (both Windows 7 and Windows XP) that do work – still no joy.

I literally went 11 pages deep on Google http://goo.gl/EddW9 and many, many more deep from each of those, looking for a fix!

I read deep somewhere in one post that someone mentioned running ‘Outlook rpcdiag’ – I don’t remember that switch. I checked RPC on the machine(s) and it showed no errors already right..

But since this was a specific ‘Outlook’ switch I though what the hell.
So…
I ran:
"outlook /rpcdiag" from the command line.

It tried to ‘find connections error’ but did not report anything. Damn..
Then it just closed after it could not really start.

Then I started Outlook in Safemode (I was prompted to upon launching Outlook, but it can be run "outlook /safe").

I was then able to add and configure the Exchange account and get connected!!
I waited until it updated the mailbox completely.
Then I restarted Outlook normally and IT WORKS NOW on all of the affected boxes!

I am not sure if all of these steps need to be taken but I now have a plan to follow.

I hope this may help someone, because from most of the posts I read it is a MAJOR issue and MS is not doing much about it! At least I’ll have my notes.