+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
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 ...
  1. #16


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,706
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Quote Originally Posted by RabbieBurns View Post
    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.

  2. Thanks to Arthur from:

    RabbieBurns (29th August 2011)

  3. #17

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,510
    Thank Post
    1,319
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    thanks arthur, got it downloaded will check it out tomorrow.

  4. #18

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,137
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    77
    Quote Originally Posted by Arthur View Post
    Yes.
    This is why I suspect it doesnt work with 2007, 2007 doesnt return that attribute :-(

  5. Thanks to sukh from:

    RabbieBurns (31st August 2011)

  6. #19

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,510
    Thank Post
    1,319
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Right thanks for that Arthur, those pshell cmdlets look pretty useful.

    Ive now got about 200 mailboxes Im about to delete

  7. #20

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,510
    Thank Post
    1,319
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Quote Originally Posted by sukh View Post
    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?

  8. #21

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,510
    Thank Post
    1,319
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    just found the setting... Will the deleted mailboxes still get backed up until the 30 days is over?

  9. #22


    Join Date
    Feb 2007
    Location
    51.405546, -0.510212
    Posts
    8,706
    Thank Post
    220
    Thanked 2,615 Times in 1,926 Posts
    Rep Power
    777
    Quote Originally Posted by RabbieBurns View Post
    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)

  10. Thanks to Arthur from:

    RabbieBurns (31st August 2011)

  11. #23

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,510
    Thank Post
    1,319
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    Quote Originally Posted by Arthur View Post
    They should be, because otherwise you wouldn't be able to reconnect the disconnected mailbox back to it's AD account.



    By the way, if you ever need to restore a mailbox you may find this link useful... Managing Disconnected Exchange Mailboxes with PowerShell
    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..

  12. #24

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,137
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    77
    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

  13. Thanks to sukh from:

    RabbieBurns (31st August 2011)

  14. #25

    RabbieBurns's Avatar
    Join Date
    Apr 2008
    Location
    Sydney
    Posts
    5,510
    Thank Post
    1,319
    Thanked 469 Times in 306 Posts
    Blog Entries
    6
    Rep Power
    199
    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.

  15. #26

    Join Date
    Dec 2008
    Location
    Essex
    Posts
    2,137
    Thank Post
    1
    Thanked 326 Times in 316 Posts
    Rep Power
    77
    Quote Originally Posted by RabbieBurns View Post
    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:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Live@EDU Delete Multiple Mailboxes
    By napsburypark in forum How do you do....it?
    Replies: 0
    Last Post: 1st August 2011, 03:34 PM
  2. [Video] 3d Printer - Create Functional Objects By Scanning And Then Printing Them
    By DaveP in forum Jokes/Interweb Things
    Replies: 9
    Last Post: 11th July 2011, 03:56 PM
  3. Scripting to Delete multiple files and folders.
    By mdixon123 in forum Scripts
    Replies: 8
    Last Post: 2nd January 2011, 07:28 PM
  4. Exchange 2007. Delete contents of multiple mailboxes
    By PeteM in forum Windows Server 2008
    Replies: 2
    Last Post: 26th May 2010, 11:56 AM
  5. Replies: 9
    Last Post: 10th February 2009, 02: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
  •