I have somewhat of a unique challenge, I'm trying to migrate a old legacy server from a locally installed version of Active Directory Domain Service to a centrally managed AWS Directory Service. As part of this migration I will be replicating the user accounts over from this same server to this new service (via a series of powershell scripts). While this process won't bring over the users passwords, most of the structures will be brought over automatically (Users/Groups/OU's/etc...) via the scripts.
I'd like to integrate this migration into my DevOps framework (this includes the need to create a automated rollback script). However as part of the migration process via a powershell script I will need to remove the locally installed version of AD and join the server to the new centrally managed service. As part of that process, I believe that I will lose any information currently stored in the AD's (preventing me from rolling back).
Is there any way to save this information (including passwords) short of imaging the whole server, or this complicated process involving other servers and ADMT etc.., so that if I wanted to undo my migration to the new service I could simply run some sort of script and have the server restored to the pre-migrated version, with the local AD server still installed and my credentials still preserved.
I feel that this should be possible, what I'd really like is to somehow disable (but not uninstall) the AD service on the local server, then join it to my centralized domain service, then if I need to rollback, re-enable my AD service and rejoin to it locally.
Searching around doesn't appear to generate any leads on "disabling" the "Active Directory Domain Services" Role, however there is certainly allot of discussion around the uninstallation process. Maybe one of these options will preserve the AD's configuration somewhere (so that if I reinstall it, it will still be there)?