Clean-MailboxDatabase Command Error - Exchange 2007

Posted on 2011-10-27
Last Modified: 2012-05-12
I deleted/disabled a users mailbox that is no longer with the company. So I run the Clean-Mailboxdatabase command and I get an error because the data base's name is Company Users with a space in the middle. Clearly the command doesnt like spaces. So I tried Clean-MailboxDatabase Company-Users and clearly that didnt work. So how do I clean a database with a space in the database name?
Question by:jaysiercks
    LVL 12

    Expert Comment

    by:Deepu Chowdary
    Are you using cmd similar to this..?

    clean-MailboxDatabase -Identity <DatabaseIdParameter> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-WhatIf [<SwitchParameter>]]

    For detailed descrition check this

    Author Comment

    No I just use Clean-MailboxDatabase Company Users. I have tried Clean-Mailbox Company_Mgmt and it worked fine. But I think the space in between Company Users is throwing it off.
    LVL 1

    Accepted Solution

    Just a guess, but have you tried quotation marks around the name?  ie. "john smith"
    LVL 12

    Expert Comment

    by:Deepu Chowdary
    Type clean-mailboxdatabase comp and press tab button to see the options available..
    (Presently im not having server to test it)
    LVL 37

    Assisted Solution

    by:Jamie McKillop

    As ACRHPSI said, you need to put quotes around the database name when it contains a space.


    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Easy CSR creation in Exchange 2007,2010 and 2013
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    729 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

    17 Experts available now in Live!

    Get 1:1 Help Now