Enterprise Software Thread, Check disabled status of multiple mailboxes (and then Delete them) in Technical; Originally Posted by RabbieBurns
Where would I find the quest script?
Quest's AD PowerShell snap-in can be download from here ...
-
29th August 2011, 05:54 AM #16 
Originally Posted by
RabbieBurns
Where would I find the quest script?
Quest's AD PowerShell snap-in can be download from here. See the cmdlet reference on the PowerGUI wiki for more info and examples.
Before you can use any of the Quest cmdlets you need to load the snap-in...
Code:
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
To save time you may want to add the line above to your PowerShell profile. Once the snap-in has been loaded you can run the command below to get a list of the QAD cmdlets.
Code:
Get-Command | Where { $_.name -match "QAD" }
Last edited by Arthur; 29th August 2011 at 06:02 AM.
-
Thanks to Arthur from:
RabbieBurns (29th August 2011)
-
IDG Tech News
-
29th August 2011, 06:35 AM #17 thanks arthur, got it downloaded will check it out tomorrow.
-
-
29th August 2011, 01:07 PM #18 
Originally Posted by
Arthur
Yes.

This is why I suspect it doesnt work with 2007, 2007 doesnt return that attribute :-(
-
Thanks to sukh from:
RabbieBurns (31st August 2011)
-
30th August 2011, 07:26 AM #19 Right thanks for that Arthur, those pshell cmdlets look pretty useful.
Ive now got about 200 mailboxes Im about to delete
-
-
31st August 2011, 04:23 AM #20 
Originally Posted by
sukh
1. If you just delete the accounts it wont just delete the mailboxes. What you should do is remove the user from the EMC which will delete the account and mailbox, or if you disable the the mailbox it will just mark the mailbox for deletion and leave the user account alone. Perform these actions via the EMC. Although you can do it via AD, it;s cleaner via EMC.
2.
Hi @sukh,
After I disable the mailbox, how long does it take to purge from the database?
-
-
31st August 2011, 07:47 AM #21 just found the setting... Will the deleted mailboxes still get backed up until the 30 days is over?
-
-
31st August 2011, 09:32 AM #22 
Originally Posted by
RabbieBurns
Will the deleted mailboxes still get backed up until the 30 days is over?
They should be, because otherwise you wouldn't be able to reconnect the disconnected mailbox back to it's AD account. 
Exchange allows us to disassociate a mailbox from an Active Directory user account, and later reconnect that mailbox to an Active Directory account. For some organizations, a mailbox database has a low deleted mailbox retention setting, and once a mailbox has been removed from a user, it is forgotten about and purged from the database once the retention period elapses. However, if you maintain your deleted mailboxes for any amount of time, having the ability to retrieve these mailboxes after they have been removed from a user can be very helpful at times.
By the way, if you ever need to restore a mailbox you may find this link useful... http://www.mikepfeiffer.net/2010/06/...th-powershell/
The Disable-Mailbox cmdlet will strip the Exchange attributes from an Active Directory user and will disconnect the associated mailbox. By default, disconnected mailboxes are retained for 30 days. You can modify this setting on the database that holds the mailbox. In addition to this, you can also use the Remove-Mailbox cmdlet to delete both the Active Directory account and the mailbox at once:
Code:
Remove-Mailbox -Identity dave -Confirm:$false
After running this command, the mailbox will be purged once it exceeds the deleted mailbox retention setting on the database. One common mistake is when administrators use the Remove-Mailbox cmdlet when the Disable-Mailbox cmdlet should have been used. It's important to remember that the Remove-Mailbox cmdlet will delete the Active Directory user account. (
Source)
-
Thanks to Arthur from:
RabbieBurns (31st August 2011)
-
31st August 2011, 09:36 AM #23 
Originally Posted by
Arthur
cheers for that... I probably could have got away with using remove-mailbox as these are old accounts in AD and Ill end up deleting them anyway, but if this is best practice then thats fine.
Is there a way to purge them before the 30 days without changing the global setting? My backup is running at about 160gb just now and is taking a fair while, which is the motivation behind the cleanup really..
-
-
31st August 2011, 09:52 AM #24 1. As you know you have rentension period for deleted mailbox, whatever you have set on your DB.
2. You will have to wait deleted items retension or you can change that setting to 0
-
Thanks to sukh from:
RabbieBurns (31st August 2011)
-
16th November 2011, 05:06 AM #25 Ok just to further update this thread with a bit of information. It seems that even after purging 200 mailboxes the mail database size didnt get any smaller.
From research I have to do an offline defrag now to sort out the mail database size.
-
-
16th November 2011, 12:08 PM #26 
Originally Posted by
RabbieBurns
Ok just to further update this thread with a bit of information. It seems that even after purging 200 mailboxes the mail database size didnt get any smaller.
From research I have to do an offline defrag now to sort out the mail database size.
Deleting mailboxes wont reduce the physcial edb size, you will get whitespace in the edb which will be used as and when needed. Either do a defrag or create a new database and move the users across and then delete the old database. Doing this involves less downtime as with a defrag you have to tale the DB offline. Also, if you;re usiing a DAG, then you will have to reseed again.
-
SHARE:
Similar Threads
-
By napsburypark in forum How do you do....it?
Replies: 0
Last Post: 1st August 2011, 03:34 PM
-
By DaveP in forum Jokes/Interweb Things
Replies: 9
Last Post: 11th July 2011, 03:56 PM
-
By mdixon123 in forum Scripts
Replies: 8
Last Post: 2nd January 2011, 08:28 PM
-
By PeteM in forum Windows Server 2008
Replies: 2
Last Post: 26th May 2010, 11:56 AM
-
By xfilz in forum Scripts
Replies: 9
Last Post: 10th February 2009, 03:46 AM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules