Last week we updated our Exchange TechNet articles.  Within that update are two new articles that I wanted to call out:

Hope you enjoy this new information.  If you have any questions, please let us know.

Ross Smith IV

Not applicable
Great Articles!  

The one part I'm stuck on is the redistribution of databases.  

I only have 6 databases, and a total of 12 database copies across a 2 node active/active CaS/HT/MB combo system with redundant hardware load balancers.   Before SP1 was released, I attempted to write my own powershell script that would redistribute the databases evenly across both servers after a reboot.   The problem I ran into is that the Move-ActiveMailboxDatabase command waits for confirmation, even when the -Confirm switch is not used.

When SP1 came out, I found the RedistributeActiveDatabase.ps1 script.  I was hoping that it would do what I wanted, but I'm running into the same problem, it wants confirmation before moving a database.   In your TechEd presentation, you mentioned that this script could be used as a scheduled task for automation, which is what I'm after.    Is there some switch I'm overlooking that is required to get around it waiting for confirmation?

My goal is to schedule a task that will move all active database copies to Server 2, then install updates and reboot.   Then when Server 1 starts back up, move all active database copies to Server 1, install updates on Server 2, and reboot it as well.   Then when Server 2 is back up, redistribute the databases evenly across both servers so everything is back to its original state.

The only thing that's keeping me from doing this, is the Move-ActiveMailboxDatabase command and RedistributeActiveDatabases.ps1 script  waiting for confirmation to move.
Not applicable
@JoshFixTheExchange, I think you may be confusing RAD with the CheckDatabaseRedundancy script, which is a script that can be run as a scheduled task.  See

http://technet.microsoft.com/en-us/library/dd351258.aspx#CheckDBRedun for details on running that script as a scheduled task.  As for the RAD script above, you can find parameters and documentation at

http://technet.microsoft.com/en-us/library/dd335158.aspx.  Hope this helps.

Not applicable
No I'm definitely not confusing the RAD script with the CRD script.   Like I said, I want to schedule a task that will move databases.  It doesn't seem this can be done, because the commands to do it, wait for confirmation.

For example, I'd like to schedule a task run 15 minutes after startup to run "RedistributeActiveDatabases.ps1 -BalanceDbsByActivationPreference".     This way when a server comes back up after a reboot, the databases will be automatically moved back to it. Sounds easy enough right?   The problem is, as I mentioned, the databases will not move without human interaction.   The script waits for confirmation.  If no one is there to type "Y" for Yes, and hit enter, the script will not complete, and the databases will not be moved.

At 54:30 of Ross's TechEd session video, he starts talking about this. At 55:23 he says "So you can implement this script as a scheduled task if you will, and have it automatically redistribute your databases back to the lowest activation preferences, and thus have an automatic means to get your databases back to the preferred state."

That is the goal.   There's nothing in the documentation on how to bypass confirmation.   The script itself uses the Move-ActiveMailboxDatabase command, which I have found will ask for confirmation every time.   Now the documentation on this command says you can use the "-Confirm" switch to force it to ask for confirmation, however there's nothing that says how to make it NOT ask.    You would think that by default the command would not ask for confirmation without that switch being used, but this is not the case.

[PS] D:exchange serverscripts>Move-ActiveMailboxDatabase -Identity testdb -ActivateOnServer mail2

Are you sure you want to perform this action?
Moving mailbox database "testdb" from server "MAIL1.domain.com" to server "MAIL2.domain.com".
Yes  Yes to All  No   No to All  [?] Help (default is "Y"):

Notice I did not use the -Confirm switch, and it still asks for Confirmation.  Using this command in a script, which the RAD script does, does not allow for automation via scheduled task, because it sits there waiting for an answer.

So again, if what Ross said in his TechEd session is true, how is this achieved?
Not applicable
Please edit the domain name out of my previous comment, I accidentally submitted it before doing so.  This post may be deleted too. Thanks!
Not applicable
@ JoshFixTheExchange: I just edited the domain names out as you requested; might be a few minutes before the edit shows.
Not applicable

RedistributeActiveDatabases.ps1 includes the Confirm parameter which when used (e.g., -Confirm:$false), will disable the move confirmation prompts.

Not applicable
Thanks Ross!   That is exactly what I was looking for.  I'm still learning Powershell. I haven't had to do much scripting since the days when everyone used KiXtart.   I was looking at the command references and, and had checked the Syntax page under the Exchange Management Shell Basics reference.  It seems what I was looking for was under the Parameters page the whole time.

The RedistributeActiveDatabases.ps1 documentation page does not list -Confirm under the parameters section. If I had paid a little more attention to this page: http://technet.microsoft.com/en-us/library/bb124388.aspx  I probably would have figured it out even without seeing it listed there.

Now I can see that the default is -Confirm:$true, so specifying -Confirm:$false will achieve the desired result.

Thanks again,
Not applicable
Yes, we will fix the documentation in a future release to also list that the -Confirm parameter is supported with this script (not all scripts support it, however).

Not applicable
Hi Ross,

Thanks for the news....
Do you know if we will have a planning guide for scenarios with Active/Active DAG?
I think that one of the most important things in scenarios like this is the Namespace Planning and how to work with it in site resilence?