Script to mount exchange 2007 database

Hello Experts

I need a script that I can schedule to mount an Exchange 2007 database (on a Windows 2008  server)
Can you please point me in the right direction.

Thank you

Alexandre MichelManager; IT ConsultantAsked:
Who is Participating?
MAS (MVE)Connect With a Mentor Technical Department HeadCommented:
Create a batch file by copying the below command and save as .bat. You can change as per your location
powershell -command "&{C:\scripts\mountdatabase.ps1}"

Open in new window

Create a powershell script using the below command and save it
Get-MailboxDatabase -Server SERVERNAME | Mount-Database -Confirm:$False

Open in new window

Create a windows schedule task to run the batch file created above.

Todd NelsonConnect With a Mentor Systems EngineerCommented:
Are you looking for something like this to create a scheduled task to run an Exchange script?

In the PS1, you could have "Mount-Database -Identity "Mailbox Database"".
Alexandre MichelManager; IT ConsultantAuthor Commented:

That would be step 2 of the project: how to schedule running the script

The 1st step is the actual content of the script... How do I mount an Exchange database using Powershell or other scripting language

Alexandre MichelManager; IT ConsultantAuthor Commented:

Thanks for that.
At the end I did not try your solution as I found that simple restarting the Exchnage IS service acheived the same result.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.