1

Remove-HybridConfiguration Cmdlet

For various reasons, the aforementioned Remove-HybridConfiguration cmdlet has been something that has been something I've had to review recently.

This cmdlet is not present in Exchange 2010, it is only available in newer versions of Exchange.  For example if we try to find this cmdlet on an Exchange 2010 server, it is not present.

Only the Get, New, Set and Update-HybridConfiguration cmdlets are available.

Exchange 2010

 Get-Command *hybrid*

Exchange 2010 Hybrid Object Cmdlets

Exchange 2016

Note that Remove-HybridConfiguation is now listed and is available.

Exchange 2016 Hybrid Object Cmdlets

However, there is a very low need to run this particular cmdlet in the vast majority of situations.

The expectation is that at least one Exchange server remains on-premises, and this is for the foreseeable future.  This is due to source of authourity remaining with on-premises as this is where objects & identities are mastered.

The crux of the question though, is what does that cmdlet do?  Does it remove all of the changes made by the Exchange Hybrid Configuration Wizard?  Well, we can take a look at a lab environment before and after running the cmdlet.

Since the cmdlet does not exist in Exchange 2010, we will use a mixed Exchange 2013 and 2016 environment.  All commands are executed from Exchange 2016 as the HCW was already executed tup upgrade the hybrid configuration.

Lab Starting Configuration

The below is an Exchange 2013/2016 lab where Exchange 2016 is used as the endpoint for all CAS namespaces.  The Exchange HCW was previously used to deploy a hybrid configuration and this is seen when running the commands below:

 Get-SendConnector
 Get-RemoteDomain
 Get-AcceptedDomain
 Get-EmailAddressPolicy
 Get-HybridConfiguration

Exchange 2016 Based Hybrid Configuration

Since most of the Exchange configuration is stored in AD DS, we can use ADSI Edit to visually show the configuration object.

CN=Hybrid Configuration,CN=Wingtiptoys,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=wingtiptoys,DC=ca

ADSIEDIT Showing Hybrid Configuration Object

The tenant was also verified to show that it was configured with the on-premises environment.

 Get-OnPremisesOrganization

Exchange Online Configuration Showing On-Premises

Removing Hybrid Configuration Object

Now that we have outlined the starting config, let us move on to actually removing the hybrid configuration object.  This will be done in the lab using

 Remove-HybridConfiguration

Running Remove-HybridConfiguration In Exchange 2016

Note the message body which is show:

Are you sure you want to perform this action?
Warning: Removing the HybridConfiguration Active Directory object will not disable or uninstall the underlining hybrid
features that have been configured in your hybrid deployment
. If you want to completely remove your hybrid
configuration, see http://go.microsoft.com/fwlink/?LinkId=259795

The link embedded in the cmdlet response is http://go.microsoft.com/fwlink/?LinkId=259795 – which points to the Remove-HybridConfiguration cmdlet documentation.

If we run Get-HybridConfiguration after running the removal command, unsurprisingly it is no longer present.   The commands are shown in the same window to prove that the removal was done.

Get-HybridConfiguration Now Empty

Note that object is no longer visible in ADSI Edit.

Hybrid Configuration Object No Longer Present - Shown In ADSIEDIT

So now, that the hybrid object has been removed what was removed from Exchange?

Verifying Exchange Hybrid Features

We can now verify if the Remove-HybridConfiguration cmdlet removed things like domains or Email Address Policies.

Despite that we removed the hybrid object, the features previously noted are still present.

After Removing Exchange Hybrid Object - Exchange Features Are Still Present

Cheers,

Rhoderick

Rhoderick Milne [MSFT]

Leave a Reply

Your email address will not be published. Required fields are marked *