Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Mount Exchange 2003 databases using Powershell

101 views
Skip to first unread message

Don Pedro

unread,
Nov 18, 2009, 7:39:07 AM11/18/09
to
Hi All.

I can use powershell to return a list of Exchange 2003 databases that are
dismounted using the following command...

Get-ExchangeServer | where-object {$_.IsExchange2007OrLater -eq $false} |
Get-Mailboxdatabase -status | where {$_.Mounted -eq $false}

However I cannot mount them by issuing the Mount-Database cmdlet. Anyone got
the equivalent code to achieve this result? I am not a coding expert by any
means so if someone has the code I need could they please post it?

Thanks in advance!

Marco Shaw [MVP]

unread,
Nov 18, 2009, 8:31:39 AM11/18/09
to

> However I cannot mount them by issuing the Mount-Database cmdlet. Anyone
> got
> the equivalent code to achieve this result? I am not a coding expert by
> any
> means so if someone has the code I need could they please post it?

Mount-Database may not support Exchange 2003.

If you need to do this using PowerShell, you'll need to look at the WMI
methods or some other way to do this.

For example, I wonder if this would help somewhat:
http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/AdminTips/Exchange/MountDismountDeleteaMailboxStorefromtheCommandLine.html

Marco

RichS [MVP]

unread,
Nov 18, 2009, 9:00:01 AM11/18/09
to

Check the Exchange 2003 pack on www.powergui.org
--
Richard Siddaway
All scripts are supplied "as is" and with no warranty
PowerShell MVP
Blog: http://richardsiddaway.spaces.live.com/
PowerShell User Group: http://www.get-psuguk.org.uk

Don Pedro

unread,
Nov 18, 2009, 9:28:06 AM11/18/09
to
Hi Richard,

I did but there is no filter to list dismounted ones, nor does it tell me
the command to mount them. It simply allows me to return the list of Exchange
2003 mailbox stores.

Sorry, but am I missing something simple here?

Peter

Don Pedro

unread,
Nov 19, 2009, 6:18:01 AM11/19/09
to
Thank you Marco,

I modified that script as I only need to check the status of a database and
mount if required. I enumerated all the mailbox stores into a text file,
modifed the output into a format I could feed to a batch job. This batch job
will run against the text file and check each in turn. If the database is
dismounted it will mount it.

It would have been cleaner to modify the script to enumerate all E2K3/E2K
databases which are dismounted and mount if required. However, I know less
about vbscript than I do about powershell.

Perhaps someone has done this and can post their code?

"Marco Shaw [MVP]" wrote:

> .
>

0 new messages