PDA

View Full Version : Important! : AD & Exchange Help


jasonmayall
18th December 2013, 15:15
Guys

I know there's a few of us 'IT Guys' on here, I'm normally fairly good with stuff like this, as its my job... But this ones got me going round in circles. Even though it seems really simple, I just cant get it to work.

Basically, We use AD 2008 and Exchange 2010.
(I know, stone age!)

But someone (NOT ME!!) deleted a user from AD by accident, Theres no way that I can find of recovering the user as we dont recycle the accounts, They just vanish.

The issue i've got is they never removed the Exchange mailbox first, So the GUID for the account is no longer there meaning the mailbox cant be deleted, used or anything.

Is there any way I can delete the mailbox without a GUID, through powershell without breaking my environment? Could really do with getting the user back up and running and experts exchange isn't helping me out this time.

smiith
18th December 2013, 15:48
Have you tried turning it off, and back on?

jasonmayall
18th December 2013, 16:14
Thats not an option unfortunately else i'd have tried that ages ago lol.
Really dont want to reboot an exchange server unless I absolutely have to!

Brettles1986
18th December 2013, 16:23
http://community.spiceworks.com/topic/129215-removing-exchange-mailbox-when-user-object-has-already-been-deleted

This may help, it is not first hand experience mind.

chompy
18th December 2013, 16:28
There's a few ways:

Have you got tomb-stoning enabled in AD? If so, just mark the user object for an authoritative restore.

What backup software do you use? you can recover AD if it's a small environment.

You can disable the mailbox, this should purge it during the next maintenance run (I've only seen this work in 2003, never 2007/2010 but it is supposed to).

or use the powershell:
$Temp = Get-Mailbox | Where {$_.DisplayName -eq 'John Rodman'}
Remove-Mailbox -Database Server01\Database01 -StoreMailboxIdentity $Temp.MailboxGuid

(syntax copied from microsoft article on removing mailboxes but the code looks like it will work)

You could do it manually and do get-mailbox | Where {$_.DisplayName -eq 'fuckwit'} | fl that should show you the GUID you need.

Nice easy powershell commands, but don't go running them without knowing what you're doing, you could delete a mailbox you didn't mean to then have to go through the pain of recovering a mailbox.

you're also far from the stoneage, I look after a few sites that still use NT4. There are quite a few government agencies that use NT4 and exchange 2003 still.

Brettles1986
18th December 2013, 16:45
I'm currently upgrading from SBS2003 and Exchange 2003 at my place of work. That's stone age!

chompy
18th December 2013, 16:46
I've done that a few times in the past month to SBS 2011 whilst we can still buy the licenses!

Brettles1986
18th December 2013, 16:49
Hopefully licences will still be available in the new year. Most suppliers will still sell off their stock.

chompy
18th December 2013, 16:51
Yeah, C2000 and Dell still list them as available but past March/April I can't see them being available anywhere retail. Might still get OEM though.

jasonmayall
18th December 2013, 17:20
There's a few ways:

Have you got tomb-stoning enabled in AD? If so, just mark the user object for an authoritative restore.

What backup software do you use? you can recover AD if it's a small environment.

You can disable the mailbox, this should purge it during the next maintenance run (I've only seen this work in 2003, never 2007/2010 but it is supposed to).

or use the powershell:
$Temp = Get-Mailbox | Where {$_.DisplayName -eq 'John Rodman'}
Remove-Mailbox -Database Server01\Database01 -StoreMailboxIdentity $Temp.MailboxGuid

(syntax copied from microsoft article on removing mailboxes but the code looks like it will work)

You could do it manually and do get-mailbox | Where {$_.DisplayName -eq 'fuckwit'} | fl that should show you the GUID you need.

Nice easy powershell commands, but don't go running them without knowing what you're doing, you could delete a mailbox you didn't mean to then have to go through the pain of recovering a mailbox.

you're also far from the stoneage, I look after a few sites that still use NT4. There are quite a few government agencies that use NT4 and exchange 2003 still.

Thanks Chompy - Just giving it all a go now so I'll let you know how I get on.

We dont run Tomb-Stones though, That would be a clever thing to do... our company doesnt do clever :)

Backups... We're currently use DPM but have recently upgraded (2 weeks ago) and havent got round to setting up the DC yet. We back the profiles up, not not the active directory side of things... Another fail. We're waiting for the big man to get his arse into gear and sort out the 3par stuff we've lying around, as well as the SANs for more robust and detailed backups.

Anyway, To work - I'll let you know :)

jasonmayall
18th December 2013, 17:25
Now why wouldnt any of the forums tell me what you've just told me?

I've spend too long racking my brain over this and you just waltz along and sort it out!

Cheers bud!

chompy
18th December 2013, 17:53
Haha, there's a reason I'm a senior network engineer at 23 :) glad it worked!

Gandi699
18th December 2013, 17:59
AD can be a arse some of the time in the way it does things. Don't get me started on the way it replicates too!


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)

chompy
18th December 2013, 18:03
Nothing wrong with the replication if you set it up right ;)

Gandi699
18th December 2013, 18:05
It doesn't tell you if it stops working at least on 2003, that's been a nightmare for me in the past. I keep my eye on it regularly now though


Sent from my iPhone using Tapatalk (http://tapatalk.com/m?id=1)

chompy
18th December 2013, 18:07
If you setup verbose logging and monitor the event logs using something like gfi/nable then you can pick it up quite easily. But when you don't have they tools to use then yeah, I see your point.

jasonmayall
18th December 2013, 19:32
Haha, there's a reason I'm a senior network engineer at 23 :) glad it worked!

That's impressive... How did you get there if you don't mind me asking? I assume uni?

I'm 22 and been doing this for just under 3 years now, I'm really struggling with the company I'm working with though, they're constantly trying to push for new technologies And loading more work onto us but keep putting off any courses (and pay rises!)

I've been trying to build a decent case for some worthwhile courses, anything you'd recommend?

chompy
18th December 2013, 19:56
That's impressive... How did you get there if you don't mind me asking? I assume uni?

I'm 22 and been doing this for just under 3 years now, I'm really struggling with the company I'm working with though, they're constantly trying to push for new technologies And loading more work onto us but keep putting off any courses (and pay rises!)

I've been trying to build a decent case for some worthwhile courses, anything you'd recommend?

Nope, no uni! I spent a few years working as a server/desktop tech at an sme contracts company and started sticking my neck out doing stuff that was not expected and fixing things no one else could figure out, got my oswp & mcitp then got head hunted for my current job. (I've been doing iT work since I was 13 but the last 3 years have been the highlights)

Now I do everything from vmware installs to sbs migrations and have a team of 4 guys, soon To be 5. Also just finished the vmware vcp course and should be sitting my vcp dv 5 early next year.

That is thr main reason I moved away from enterprise work into the sme market. The politics behind getting anything done is fucking stupid and the pay is pathetic. I worked in a place that was a 100mile a day commute and payed 14k. With a newborn and wedding to pay for at the time I got told to bolt when I asked for a pay rise.

Depends on what you want to do, if you want to do domain management then the mcitp is a must. If you want to go into virtualization then go for the vcp. If you want to do networking then the ccna. If you want to do security (that's what I want to do) then you can go mainstream like the ceh/cssip/comptia security+ but I'd recommend the offensive security qualifications. I did the oswp and would love to do the oscp but I'd rather build my car when the kids are young and develop my career further in a few years.