none
DAG maintenance scripts do not work anymore after SP2 UR5 upgrade

    Question

  • We are using the StartDAGServerMaintenance.ps1 and StopDAGServerMaintenance.ps1 scripts on our mailbox cluster. Today I upgraded the first node to UR5 (and installed OS updates), and now the scripts do not work anymore:

    At C:\program files\microsoft\Exchange Server\v14\Scripts\DagCommonLibrary.ps1:494 char:6
    +         return $moveSuccessful
    +         ~~~~~~~~~~~~~~~~~~~~~~
    Control cannot leave a finally block.
    At C:\program files\microsoft\Exchange Server\v14\Scripts\DagCommonLibrary.ps1:926 char:5
    +                 return $success
    +                 ~~~~~~~~~~~~~~~
    Control cannot leave a finally block.
        + CategoryInfo          : ParserError: (:) [], ParseException
        + FullyQualifiedErrorId : ControlLeavingFinally
    
    Test-RsatClusteringInstalled : The term 'Test-RsatClusteringInstalled' is not recognized as the name of a cmdlet,
    function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
    path is correct and try again.
    At C:\program files\microsoft\Exchange Server\v14\Scripts\StartDagServerMaintenance.ps1:78 char:2
    +     Test-RsatClusteringInstalled
    +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Test-RsatClusteringInstalled:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    
    log-verbose : The term 'log-verbose' is not recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At C:\program files\microsoft\Exchange Server\v14\Scripts\StartDagServerMaintenance.ps1:232 char:4
    +             log-verbose ($StartDagServerMaintenance_LocalizedStrings.res_0015 )
    +             ~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (log-verbose:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    
    log-verbose : The term 'log-verbose' is not recognized as the name of a cmdlet, function, script file, or operable
    program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
    At C:\program files\microsoft\Exchange Server\v14\Scripts\StartDagServerMaintenance.ps1:97 char:3
    +         log-verbose ($StartDagServerMaintenance_LocalizedStrings.res_0008 -f $shortSer ...
    +         ~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (log-verbose:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    

    Were there any changes in UR5 or in Windows? Is there any workaround?

    Wednesday, December 12, 2012 1:03 PM

Answers

  • Hi svhelden,

    I had the same issue and found it is WMF 3.0 which is not currently supported with Exchange 2010    Uninstalling KB2506143 might resolve the problem however I am looking into other solutions before attempting this.

    Regards

    • Marked as answer by svhelden Wednesday, December 12, 2012 2:23 PM
    Wednesday, December 12, 2012 2:15 PM
  • Good to hear it resolves the problem svhelden.

    Rhoderick, you make a very fair point although I do think Windows Update should have a built in checking mechanism to block updates which are incompatible with currently installed Microsoft software or the batch of updates being installed at the time eg. don't allow IE8 updates to be installed when IE9 is also installed within the same update batch.   Checking updates online appears to single out/deselect certain updates however systems managed by WSUS install all approved updates in the same batch which often results in failures if the administrator does not manually deselect them to be installed separately.

    The exact same issue with PowerShell incompatibility happened on Exchange 2007 and WMF 2.0.

    • Marked as answer by Zi Feng Wednesday, December 26, 2012 9:19 AM
    Wednesday, December 12, 2012 2:40 PM

All replies

  • Can you please confirm if this was V1 or V2 of RU5? 

    What KB does it say in programs for the installed update?


    Cheers,

    Rhoderick

    Microsoft Premier Field Engineer, Exchange

    Blog: http://blogs.technet.com/rmilne  Twitter:    LinkedIn:    Facebook:

    Note: My posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Wednesday, December 12, 2012 1:26 PM
  • It was RU5v2.

    Apart from Dell BIOS and Firmware updates, these were all patches that have been installed:

    Security Update for Windows Server 2008 R2 x64 Edition (KB2779030)
    Update for Root Certificates For Windows Server 2008 R2 x64 Edition [December 2012] (KB931125)
    Update for Windows Server 2008 R2 x64 Edition (KB2762895)
    Update Rollup 5-v2 for Exchange Server 2010 Service Pack 2 (KB2785908)
    Windows Malicious Software Removal Tool x64 - December 2012 (KB890830)
    Windows Management Framework 3.0 for Windows Server 2008 R2 for x64-based Systems (KB2506143)

    Wednesday, December 12, 2012 2:11 PM
  • Hi svhelden,

    I had the same issue and found it is WMF 3.0 which is not currently supported with Exchange 2010    Uninstalling KB2506143 might resolve the problem however I am looking into other solutions before attempting this.

    Regards

    • Marked as answer by svhelden Wednesday, December 12, 2012 2:23 PM
    Wednesday, December 12, 2012 2:15 PM
  •  Uninstalling KB2506143 might resolve the problem however I am looking into other solutions before attempting this.

    Yes! I had the same idea now, and it fixed the issue.

    KB2506143 is actually PowerShell 3.0 (which is not clear from the name as "Windows Management Framework"). No wonder that 

    Wednesday, December 12, 2012 2:23 PM
  • Good to hear you are up and running again!

    I do want to comment on what you are installing though, as let's say you have a niggly performance issue after this maintenance.  Was it the OS updates, OS Security update, Server BIOS, server firmware, Exchange update?  I would rather update a given component, validate then in the next maintenance window do the next component. 

    And I have had to deal with several critsits where the above happened, and it is not fun :(


    Cheers,

    Rhoderick

    Microsoft Premier Field Engineer, Exchange

    Blog: http://blogs.technet.com/rmilne  Twitter:    LinkedIn:    Facebook:

    Note: My posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Wednesday, December 12, 2012 2:27 PM
  • Good to hear it resolves the problem svhelden.

    Rhoderick, you make a very fair point although I do think Windows Update should have a built in checking mechanism to block updates which are incompatible with currently installed Microsoft software or the batch of updates being installed at the time eg. don't allow IE8 updates to be installed when IE9 is also installed within the same update batch.   Checking updates online appears to single out/deselect certain updates however systems managed by WSUS install all approved updates in the same batch which often results in failures if the administrator does not manually deselect them to be installed separately.

    The exact same issue with PowerShell incompatibility happened on Exchange 2007 and WMF 2.0.

    • Marked as answer by Zi Feng Wednesday, December 26, 2012 9:19 AM
    Wednesday, December 12, 2012 2:40 PM
  • I installed WMF 3.0 in my lab on a system before installing Exchange 2010 SP1.

    Exchange 2010 SP1 installed without issues.

    SP2 installed without issues.

    SP2 RU5 wouldn't install on the system until I removed WMF 3.0.


    Robert

    Thursday, December 13, 2012 1:15 AM
  • Good to hear it resolves the problem svhelden.

    Rhoderick, you make a very fair point although I do think Windows Update should have a built in checking mechanism to block updates which are incompatible with currently installed Microsoft software or the batch of updates being installed at the time eg. don't allow IE8 updates to be installed when IE9 is also installed within the same update batch.   Checking updates online appears to single out/deselect certain updates however systems managed by WSUS install all approved updates in the same batch which often results in failures if the administrator does not manually deselect them to be installed separately.

    The exact same issue with PowerShell incompatibility happened on Exchange 2007 and WMF 2.0.

    I know what you are asking, and that feedback has been passed to the WU team.  There have been a few threads on such things, and yes its not perfect - sorry :(    

    The system requirements page here http://technet.microsoft.com/en-us/library/ff728623(EXCHG.141).aspx

    shows the versions of PowerShell that are tested and supported - at this time version 3 is not there. 


    Cheers,

    Rhoderick

    Microsoft Premier Field Engineer, Exchange

    Blog: http://blogs.technet.com/rmilne  Twitter:    LinkedIn:    Facebook:

    Note: My posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Thursday, December 13, 2012 1:52 AM
  • I installed WMF 3.0 in my lab on a system before installing Exchange 2010 SP1.

    Exchange 2010 SP1 installed without issues.

    SP2 installed without issues.

    SP2 RU5 wouldn't install on the system until I removed WMF 3.0.


    Robert

    Hey Robert - take a peek at the page mentioned above http://technet.microsoft.com/en-us/library/ff728623(EXCHG.141).aspx

    I like how you roll, experimenting in your lab with this, but WMF 3 is not supported with Exchange 2010 right now so it will not be a scenario validated or tested for RU5.

    I'm feeling a blog on this to get the word out there :)

     

    Cheers,

    Rhoderick

    Microsoft Premier Field Engineer, Exchange

    Blog: http://blogs.technet.com/rmilne  Twitter:    LinkedIn:    Facebook:

    Note: My posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

    Thursday, December 13, 2012 1:56 AM
  • Thanks Rhoderick regarding the Windows Updates issue, here is the workaround I found for having WMF 3.0/PowerShell 3.0 on Exchange 2010 if it hasn't already been mentioned or documented

    Open PowerShell V2 by running powershell -v 2 from an elevated command prompt

    Change directory to scripts cd 'c:\Program Files\Microsoft\Exchange Server\V14\Bin'

    Run .\RemoteExchange.ps1

    Regards


    Thursday, December 13, 2012 3:09 AM
  •  

    shows the versions of PowerShell that are tested and supported

    Yes! That's why I wouldn't have installed the update if it would be named "PowerShell 3.0"! But not everyone will notice that "Windows Management Framework 3.0" contains PowerShell 3.0.

    Thursday, December 13, 2012 5:27 AM
  • hello, I ran into the same problem!  After uninstalling update, it fixed the issue with DAG maintenance mode, but now I get the following error when opening the Exchange Management Shell.  Looks like it still wants 3.0. Any idea how to fix and get it reverted back to 2.0?

    Unable to find type [Microsoft.PowerShell.Commands.ExportPSSessionCommand, Microsoft.PowerShell.Commands.Utility, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]: make sure that the assembly containing this type is loaded.

    WARNING: Can't generate Export-Module for the current session using Import-PSSession.

    Monday, December 17, 2012 6:28 AM
  • Hi Bcehr,

    A workaround is that you can update the Exchange Management Shell shortcut Target section and place -version 2 after powershell.exe

    ie. C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -version 2 -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"

    Regards

    Mark

    Monday, December 17, 2012 6:34 AM
  • Thanks for quick reply!  As best I can tell this does work! Is there anyway to fix the entire system to think its running v2 again, since that is all that is now installed?  Seems like uninstall doesn't actually put everything back the way it was?
    Monday, December 17, 2012 6:44 AM
  • No problems, the only option may be to wait for Exchange 2010 SP3 which appears will support PowerShell 3.0

    http://blogs.technet.com/b/exchange/archive/2012/12/14/windows-management-framework-3-0-on-exchange-2007-and-exchange-2010.aspx

    As one of the users in the post said .NET Framework 4.0 also needed to be uninstalled so this might be worth a try.

    Regards

    Tuesday, December 18, 2012 3:10 AM