How to remove inactive Exchange Hybrid Agent if the local server does not exist anymore

Dowidat Jan 0 Reputation points
2024-02-09T16:22:30.0366667+00:00

Hello, i have the problem, that in our exchange hybrid environement there is an orphaned Exchange Hybrid Agent which i cannot remove. The agent is inactive because the old exchange server it belonged to does not exist anymore. Various tries with powershell show the problem: User's image

Now when i try to remove the inactive agent with powershel, i get the 404 not found error: User's image

The active agent is running on an Exchange 2016 server and is running fine. The inactive agent was running on an older Exchange version where the local server does not exist anymore. How can i remove the inactive agent? Regards, Jan

Microsoft Exchange Online
Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,448 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,238 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Bill Clarkson-Antill 15 Reputation points MVP
    2024-02-11T03:39:57.9066667+00:00

    Hey @Dowidat Jan Have you tried the Remove-HybridConfiguration PowerShell cmdlet Check out the below page for the reference https://learn.microsoft.com/en-us/powershell/module/exchange/remove-hybridconfiguration?view=exchange-ps


  2. Yuki Sun-MSFT 41,221 Reputation points Microsoft Vendor
    2024-02-12T08:00:04.27+00:00

    Hi @Dowidat Jan ,

    Please try using one of the following options and check if it can help:

    • Run the following Remove-AzureADApplicationProxyApplication command:
      Remove-AzureADApplicationProxyApplication -ObjectId <application GUID> -RemoveADApplication $true
      
    
    • Run the following command to get the application GUID, and then run the Remove-AzureADApplicationProxyApplication command to remove the application:
      Get-AzureADServicePrincipal | where {$_.Tags -Contains "WindowsAzureActiveDirectoryOnPremApp"} | fl AppId, DisplayName
      
    

    Reference: Can't register a Hybrid Agent in Exchange Server.


    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.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.