Defragmentation of Exchange 2010 SP1 mode Hosting

Posted on 2011-10-24
Last Modified: 2012-05-12
Hello friends

I need to defrag my Exchange 2010 SP1 Hosting.
But I found the documentation refers only to the Exchange console.

I need the command to defragment using powershell.

Thank you.
Question by:welltecnologia
    LVL 8

    Expert Comment

    1st Dismount the Database;

    Dismount-Database 'db01'

    Then use ESEutil to defrag the database

    eseutil /d 'db01.edb' /t\\testserver\defrag\temp.edb

    the file location is the temp location for the database during the defrag. i.e. a large file storage device.

    Author Comment

    The command was not very clear, I try to run it. Well not quite understand.

    After running the command as reassemble the database again?
    LVL 8

    Expert Comment

    Which command is not clear?
    \\testserver\defrag\temp.edb is a UNC share with enough free space = 115% of the current database size. This is for the eseutil to use to copy data too during the defrag process.
    When the process is finished all you have to do is run the Mount-Database command and remount the database.

    Author Comment

    Let me see if I understand correctly then, these are the steps:

    1 Run: Dismount-Database 'db01'

    2 Run: eseutil /d 'db01.edb' /c:\defrag\temp.edb

    3 Run: Mount-Database 'db01'

    It would be this way?

    Author Comment

    Please, correct the command ?
    LVL 8

    Accepted Solution

    the /t has to be a UNC share. It cannot be C:\ it has to be unc, also it has to have the /t before it to indicate the temp location
    even if its the same machine i.e.
    eseutil /d 'db01.edb' /t\\localhost\c$\defrag\temp.edb

    the rest is fine

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Learn more about how the humble email signature can be used as more than just an electronic business card. When used correctly, a signature can easily be tailored for different purposes by different departments within an organization.
    Set OWA language and time zone in Exchange for individuals, all users or per database.
    In this video we show how to create an email address policy in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Mail Flow…
    The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now