HI ,
The article covers all the steps neatly , in addition , you can refer to the MS doc for exporting and importing settings and installation of these components on the new server
https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-import-export-config