
This guide considers the fastest way to decommission an Exchange server in Hybrid deployment so i consider some point as implied.
So first we need to move al obbjects to the cloud …Take in mind that all must have the “onmicorosoft.com” domain.
Go to Address rule polices and add it



Now our objects has the “onmicrosoft.com” and we can move to the cloud.
Go to 365 and issue a “migration task” to do it.







When migration is finished, we need to remove the relationship from the on-premises and 365 (open Powershell on 2010 server and issue this commands..)
Get-OrganizationRelationship |fl

Remove-OrganizationalRelationship -identity “On-premises to O365 – d40db1fd-758f-4c70-a4d9-3d6027d03a6b”
Now this :
Remove-OrganizationRelationship -identity “O365 to On-premises – d40db1fd-758f-4c70-a4d9-3d6027d03a6b”

At this point you have to remove, under address policy the “onmicrosoft.com” domain.

Now issue this command:
Remove-FederationTrust -Identity “Microsoft Federation Gateway”

If you receive an error , you have to remove the federated domain...
To do this issue this commands..
Get-FederatedOrganizationIdentifier

now remove it with this command:
Remove-FederatedDomain -DomainName softcomet.it
now we can remove the Federation Gateway…
Remove-FederationTrust -Identity “Microsoft Federation Gateway”
Now remove the hybrid domains..

Now remove this:

Remove the send connector:
Get-SendConnector and remove it with remove-sendconnector

Now go to 365 and remove the connectors “inbound” and “outbound”

At this point, the last remove… Remove the Hybrid config. (if you have an exch 2013)

Open ADSI and delete it .

That’s it!