Unable to uninstall Exchange 2016 CU23

Ivan Kucheryaviy 35 Reputation points


We have a lot of exchange servers in our organization and sometimes we need to uninstall exchange for re-organizing environment. It is easier to add new server migrate stuff there and then uninstall old servers.

During such tasks I have found that it is impossible to uninstall Exchange 2016 CU23, while other versions were uninstalling with no problem.

When I uninstall exchange server uninstall successfully runs throug removing Mailbox role, removes object from AD organization, but then follows to uninstall Unified Messaging Role and fails on

The following error was generated when "$error.Clear(); 
          uninstall-MsiPackage -ProductCode $RoleProductCode -LogFile $RoleLogFilePath -PropertyValues ("ESE=1");

          $exchsrv=Get-ExchangeServer -Identity $lochost -DomainController $RoleDomainController;
          if (-not $exchsrv.IsMailboxServer)
            uninstall-MsiPackage -ProductCode $RoleTeleProductCode -LogFile $RoleLogFilePath;

          if ( $RoleTransProductCode -ne [system.guid]::empty )
            uninstall-MsiPackage -ProductCode $RoleTransProductCode -LogFile $RoleLogFilePath;

          uninstall-MsiPackage -ProductCode $RoleTtsProductCode -LogFile $RoleLogFilePath;
        " was run: "Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException: The operation couldn't be performed because object 'MBX' couldn't be found on 'DC'.
   at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)
   at Microsoft.Exchange.Configuration.Tasks.GetObjectWithIdentityTaskBase`2.InternalProcessRecord()
   at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()
   at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".

This error is absolutely legit - because there's no such exchange server in organization anymore. Uninstall already removed it on previous step. Why it works this way I have no idea. There're no way I could find to at first remove unified messaging role and only after that proceed with removing mailbox role. Also, to my surprise there're no way to repair this installation - nothing helps. uninstall from command prompt, repair, try for reinstall failed installation - nothing helps.

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,067 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,335 questions
{count} votes

7 answers

Sort by: Most helpful
  1. Arsalani, Talal 5 Reputation points


    We're seeing the exact same error in our Environment, i was able to uninstall Exchange 2016 C23 successfully:-)

    first remove/delete the Watermark items in the image.

    Uinstall Exchange

    had a Watermark and Action under the ClientAccessRole, CafeRole, HubTransport, UnfiedMessegingRole and TransportRole

    1 person found this answer helpful.
    0 comments No comments

  2. Thameur-BOURBITA 32,496 Reputation points

    Hi @Ivan Kucheryaviy

    Following to the error , it seems that the Exchange server is not found in active directory. You can check it through adsiedit.

    You can also delete the server and it's mailbox database using ADSIEDIT GUI:

    User's image

    Please don't forget to mark helpful answer as accepted

  3. Ivan Kucheryaviy 35 Reputation points

    As I described in my post Exchange server is not in AD anymore. It was deleted by uninstall step uninstalling Mailbox role. But uninstall process still trying to find it for following step and failing. It looks for me like uninstallation bug.

    0 comments No comments

  4. Xuyan Ding - MSFT 7,561 Reputation points

    Hi @Ivan Kucheryaviy,

    If you confirm that the Exchange server is not in AD, it is recommended that you reinstall the operating system, which will not have any impact on AD.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

  5. McArdle, Joseph 0 Reputation points

    I have the exact same issue. The question is, if you check the link Markus has above, if the servers you want to uninstall exchange from are no longer in the Schema Config (from ADSIEDIT) and no longer in AD, and you run the Get-ExchangeServer and Get-TransportService from a good, running Exchange Server, and the old ones you ran the uninstall on dont show up, is it safe to assume from a Schema and AD perspective (your Tenant Environment) that they are gone, and no remnants remain, and it is safe to format those systems ?

    0 comments No comments