Updating Exchange 2013 DAG Servers using CAU

Hi

I have 3 test 2012R2 servers with Exchange 2013, one CAS and two MDB with DAG configuration.

I try to automate install windows update on DAG servers using Cluster Aware Updating.

CAU configuration pass all tests.

I wrote simple PS script to move active database copy to another DAG member to run preupdate

add-pssnapin Microsoft.Exchange.Management.PowerShell.E2010
$computer = gc env:computername
Move-ActiveMailboxDatabase -Server $computer

CAU failed updating while runing preupdate script on node

In event viewer I have this error

CAU run failed on node VM-MDB-02. Details: Microsoft.ClusterAwareUpdating.ClusterUpdateException: Error records were returned from this script: "c:\scripts\PreUpdateScript.ps1"
   at MS.Internal.ClusterAwareUpdating.ScriptManager._ThrowIfError(PowerShell shell, String scriptName)
   at MS.Internal.ClusterAwareUpdating.ScriptManager.ExecuteFile(String scriptPath)
   at Microsoft.ClusterAwareUpdating.Commands.InvokeCauRunCommand.<>c__DisplayClass56.<_ProcessNode>b__48()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ClusterAwareUpdating.Commands.InvokeCauRunCommand.Retrier.<>c__DisplayClass91.<<RetryAsync>b__90>d__93.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Microsoft.ClusterAwareUpdating.Commands.InvokeCauRunCommand.Retrier.<RetryAsync>d__96`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.ClusterAwareUpdating.Commands.InvokeCauRunCommand.<_ProcessNode>d__5c.MoveNext()

What am I doing wrong ? Thanks for all answers.

Regards

Piotr Walkowiak

August 19th, 2015 2:55am

Hi Piotr,

You shouldn't add-pssnapin to run Exchange cmdlets, you should use PS remoting.

Connect to Exchange using remote Shell:

https://technet.microsoft.com/en-us/library/dd335083(v=exchg.150).aspx

You might want to Remove-PSSession $Session at the end.

If you are already inside Exchange Box, use this:

Invoke-Expression -command ". 'C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto -ClientApplication:ManagementShell "		
Free Windows Admin Tool Kit Click here and download it now
August 19th, 2015 7:25am

Hi Satyajit,

Many thanks for solution, it works!

Regards

Piotr Walkowiak

August 21st, 2015 7:13am

Hi Piotr,

Good to know that it works, but would still want to know which one did you use out of the two.

Secondly please marks the answer as answer so that others can benefit from it.

Free Windows Admin Tool Kit Click here and download it now
August 21st, 2015 8:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics