Forum Discussion
Hybrid Server Removal post CU12
Has anyone else successfully removed their last hybrid server using the process described here https://learn.microsoft.com/en-us/exchange/manage-hybrid-exchange-recipients-with-management-tools We’ve done this, seems to have worked, but now have a problem with loading the Exchange 2019 CU12 (or above) Management Tools on other admin machines so can’t access the PowerShell commands needed to run the remote recipient command set.
We followed that article (and the steps it referred to in the one it links to) and all went as expected. After running the AD Clean Up script the machine we’d installed the Exchange 2019 Management Tools on errored when loading Exchange PowerShell with “AutoDiscoverAndConnect:No Exchange servers are available in any Active Directorey sites. You can’t connect to remote PowerShell on a computer that only has the Management role installed”. We CAN get round it on that machine by running WINDOWS PowerShell and from within that loading the Exchange snap-in with “Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn” and then from there we can manage remote recipients as expected. However when we go to install the Exchange Management Tools on another machine Exchange setup states it needs to run ADPrep. We haven’t done that yet as it seems that we’d be reversing what the cleanup script is supposed to do, but we’re not sure if that means something is wrong or whether we have missed a step somewhere – the whole point of the exercise is to be able to remove the last hybrid server and just use PowerShell to manage the appropriate AD attributes for remote mailboxes/DLs etc., However we’re stuck at the moment with one server where we can do this (as described above) running but which is currently a single point of failure.
4 Replies
Additionally, if you're in a fully cloud-based environment, consider transitioning completely to Exchange Online administration for managing users, mailboxes, and configurations. For remote users, you'll rely entirely on Exchange Online PowerShell and potentially Azure AD for managing user attributes.
Key Steps to Consider:
- Verify Exchange Online PowerShell Configuration for remote mailbox management.
- Re-run the Hybrid Configuration Wizard (HCW) to ensure cloud synchronization and cleanup if necessary.
- Evaluate the need for ADPrep based on your environment and the steps you’ve already taken, considering whether it’s safe to proceed with schema updates.
- Transition to Cloud-Only Management using Exchange Online PowerShell and Azure AD tools for long-term mailbox and user management.
Connect-ExchangeOnline -UserPrincipalName <email address removed for privacy reasons> -ShowProgress $true
Get-Mailbox -RecipientTypeDetails RemoteMailbox
Set-Mailbox <remoteMailbox> -EmailAddresses <newEmail>ADPrep Requirement during Setup of Exchange 2019 Management Tools
If you're being prompted to run ADPrep when trying to install Exchange Management Tools, this indicates that your Active Directory schema may need to be updated or that Exchange needs to ensure that your AD schema is ready for the Exchange version you're installing (CU12). ADPrep is typically required when you're preparing for a new Exchange server version or updating an existing one to ensure that the AD schema is compatible.
Solution:
- Running ADPrep after the cleanup script can be a bit tricky, as it sounds like you want to avoid reversing the cleanup steps. If your Exchange 2019 CU12 setup is prompting for ADPrep, it suggests that something in the schema or AD configuration is still pointing to the need for an Exchange server presence.
- You can try to run ADPrep in a controlled way to ensure the schema is compatible with CU12, but you should first carefully assess whether this step is absolutely necessary. It's possible that your schema update was already done during the previous steps, and this might be an artifact of some lingering configuration.
If the ADPrep step is necessary, you might be looking at:
- Running the ADPrep schema update using the adprep /forestprep and adprep /domainprep commands from your Exchange installation media, but be sure to consult your current environment's version and ensure that it's compatible with the cleanup process.
- If you proceed with ADPrep, it might be helpful to run the Hybrid Configuration Wizard (HCW) again to ensure the environment is correctly aligned with the cloud setup and that all objects are cleanly synchronized.
3. Missing Exchange Server for Hybrid Management
Since your goal is to remove the last hybrid server but still manage remote mailboxes and distribution lists (DLs), you are effectively transitioning to a cloud-only management model, but you still need to manage some Exchange-related attributes for on-premises AD objects.
Solution:
- You can still manage hybrid configurations or remote recipients without having an on-prem Exchange server by using Exchange Online PowerShell.
- Install the Exchange Online PowerShell module (EXO V2 module) and use it for managing remote mailboxes and recipients.
- Use Azure AD Connect for syncing your on-premises AD objects with Azure AD and Exchange Online.
- For direct access to Exchange attributes like mailboxes or DLs, you can use Azure AD PowerShell commands.
Error with PowerShell Connectivity ("No Exchange servers are available")
This error usually happens when you're trying to connect to Exchange via remote PowerShell, but no Exchange server is available to provide the session. Since you've removed your hybrid server, the Exchange management tools are no longer able to connect to an active Exchange server for PowerShell management. The workaround you're using (loading the Exchange snap-in manually via Add-PSSnapin) is a valid temporary solution but isn't scalable.
Solution:
- After removing the last hybrid server, you'll need a different way to manage Exchange Online recipients from on-premises, without having a live Exchange server available. In this scenario, you'll likely need to:
- Use Exchange Online PowerShell for managing recipients and objects in Exchange Online.
- If you need to perform tasks for on-premises Active Directory objects related to Exchange, those should be manageable via PowerShell on a machine with the Exchange Management Tools.
If you're using Exchange 2019 CU12 and it's still attempting to connect via remote PowerShell, you might want to verify that you're correctly managing your on-premises AD objects, using AD-specific tools for Exchange attributes. Since you’re not connecting to a live Exchange server anymore, consider using PowerShell scripts for handling Exchange attributes (e.g., Set-Mailbox, New-Mailbox, etc.) for cloud or hybrid configurations.
- After removing the last hybrid server, you'll need a different way to manage Exchange Online recipients from on-premises, without having a live Exchange server available. In this scenario, you'll likely need to: