How to mount/dismount mailbox databases via PowerShell

Posted: October 30, 2012 in Exchange 2010, MBX, Powershell
Tags: , , , , , , ,
Hi folks,
for several times I wanted to dismount and re-mount one or more mailbox databases from an Exchange 2010 server. It’s a hard way to do this with the EMC so i  figured out the PowerShell commands to do this quick and easy.
Dismount one database:
Dismount-Database -Identity DBNAME -Confirm:$False
Dismount all databases of a server
Get-MailboxDatabase -Server SERVERNAME | Dismount-Database -Confirm:$False
Mount a single database
Dismount-Database -Identity DBNAME -Confirm:$False
Mount all databases of a server
Get-MailboxDatabase -Server SERVERNAME | Mount-Database -Confirm:$False

Cheers,

Chris

Advertisements
Comments
  1. Era Tesla says:

    Great to read all the steps i was looking for from last 2 hours. 🙂 Powershell utility works well.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s