Link to home
Start Free TrialLog in
Avatar of mdswireless
mdswirelessFlag for Canada

asked on

deleting mailbox problem in exchange 2007

its a general question..but i have a reason

I deleted a mailbox and it end up going into the dissconnected mailbox...i removed it by using this command:

Get-MailboxStatistics -database “MyServer\Mailbox Database” | where {$_.Disconnectdate -ne $null} | foreach {Remove-mailbox -Database $_.database -StoreMailboxIdentity $_.MailboxGuid}

which works fine

the problem is that am running out of disk space and am cleaning up all the mailboxes that are not in use...my hdd is 1TB in size and used space is 900GB...which leaves me with 89GB left of free space...so my question is when am deleted the unused mailboxes should I see more free space...or do i have to do something with the mailbox database to regain the hdd space?

thanks
Avatar of vanbarsoun
vanbarsoun
Flag of United States of America image

Did you do a purge by running mailbox cleanup? I'm speaking from Exchange2003 so ignore if that doesn't apply.
You might also have to do an offline-defrag of the exchange database to get that space back.
Avatar of jjmartineziii
Deleting mailboxes does not clear the space. It's whitespace.

You can see the amount of whitespace in a db by using this command:
Get-MailboxDatabase Database1 -Status | FT Name,AvailableNewMailboxSpace

If you have tons of whitespace, you can reclaim it by using ESEUTIl but it requires you to take your DB offline.

When your database grows, it starts by using whitespace.
Avatar of mdswireless

ASKER

@jjmartineziii

i tried running the command you said but i get an error

my database name is
Name
----
Mailbox Database


so am i to type
Get-MailboxDatabase Mailbox Database -Status | FT Name,AvailableNewMailboxSpace ?
yes, but you'll probably have to put the full database name in quotations
ok this is the output

[PS] C:\>Get-MailboxDatabase "Mailbox Database" -Status | FT Name,AvailableNewMa
ilboxSpace

Name                                            AvailableNewMailboxSpace
----                                                   ------------------------
Mailbox Database



doesnt show space
My apologies. It might only work in 2010.

Do you have Event 1221 in your eventlog on the server that's hosting the database?

That event should show the free space also.

yep it shows

The database "First Storage Group\Mailbox Database" has 19 megabytes of free space after online defragmentation has terminated.

but thats impossabile becuase i deleted 20 accounts and 1 account had to been over 1GB in size
when did you delete those accounts? that event should happen after defragmentation which happens overnight. So if you deleted them today, you should see a new event tomorrow
ok i deleted 15 mins ago...so it i run  ESEUTIl /D...this will force a defrag and regain my space? and i am guessing I have to offline the database before I do this correct?
ASKER CERTIFIED SOLUTION
Avatar of jjmartineziii
jjmartineziii
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for the help