KB ID 0001473
Problem
If you are retiring a CA Server, or there’s a problem with the server and you want to move Microsoft Certificate Services to another server, the procedure is pretty straight forward.
BE AWARE: We are moving the CA Server Name , NOT the Server Name (FQDN), the two things are NOT the same, (you might have called them the same thing!) But a Certificate Authority has a name of its own, and that’s what we are going to move.
So the new server doesn’t have to have the same name? No, it can do if you really want, but that’s an added layer of complication I can’t see the point of?
In the video below, I’m migrating from Server 2008 R2 to Server 2019, and I’m also moving CRLs and OSCP responders. In the screenshots below I’m moving from Server 2016 to Server 2016, but the process is pretty much identical all the way back to Server 2003.
Can I migrate from Server 2008 (NON R2) to 2016 (or newer): Yes, but not directly, you need to upgrade to Server 2012 R2 first. If you don’t, the database wont mount and you will get this error.
Solution
On the ‘Source‘ server, open the Certificate Services management console > Right click the CA NAME > All Tasks > Back up CA.
The backup wizard will open, Next > Tick BOTH options > Select a Backup Location > Next > Set a password (you will need this to set the new CA up!) > Next > Finish.
Now we need to take a backup of the Registry key that holds the information for this CA server. Run ‘regedit’ > Navigate to;
Export a copy of this key, (save it in the same folder that you backed up to earlier).
Now we need to uninstall CA Services from this server. Server Manager > Manage > Remove Roles and Services > Next.
REMOVE all the CA role services first! > Complete the Wizard, then launch the wizard again and select ‘Active Directory Certificate Services’ > At the pop-up select ‘Remove Features’ > Next.
Next > Next > Next > Close.
Setup Certificate Services on the Target/New Server
Server Manager > Add Roles and Features > Next.
Next > Select ‘Active Directory Certificate Services’ > Add Features > Next.
For now let’s just stick with the Certification Authority > Add the other role services later* > Next.
*Note: I’ve written about all these role services before, just use the search function, (above), if you are unsure what they all do.
Next > Close.
Warning > Configure Active Directory Certificate Services > Next.
Next > Enterprise CA (Unless it’s an offline non domain joined CA) > Root CA (unless it’s a subordinate CA!) > Next.
> Select ‘Use existing private key‘ > Select ‘Select a Certificate and use its associated private key‘ > Next > Import > Browse > In your backup folder locate the certificate (it will have a .p7b extension.) > Enter the password > OK > Select the Cert > Next.
Next > Next > Configure > Close.
Stop Certificate Services;
If your new server has a different hostname/FQDN open the registry file you exported above with Notepad, locate and change the CAServerName entry to the name of the NEW server.
Right click the registry backup > Merge > Yes > OK.
Launch the Certificate Services management console > Right Click the CA NAME > All Tasks > Restore CA.
The restore wizard will start > Next > Browse to the folder with your backup in > Next > Enter the password you used (above) > Next > Finish.
You will be prompted to start the Certificate Services service > Yes.
What About Certificate Templates? Do I need to Move Them?
No! Certificate templates are actually stored in Active Directory, NOT in/on the actual Certificate Services server, (that’s why sometimes they take a while to appear after you create them!) You can see them here;
Related Articles, References, Credits, or External Links
NA
09/02/2019
Thank you for submitting the new hostname CA server Fix.
15/05/2019
Nice and clear walkthrough
I used this to perform a move for the CA service on a pair of 2012 R2 servers.
No issues were experienced beyond ensuring *NOT* to select the “database” sub-directory when performing the final restore, use the parent directory.
Thanks for taking the time to write and present this so well.
Stu
16/05/2019
No problem Stu, thanks for the feedback.
30/05/2019
Thanks for the nice and concise write-up. I’ll be using it to migrate a 2008R2 CA to a 2016 server. Quick question, do I need to back up and restore the cert templates too?
-George
30/05/2019
Cheers George, the templates are actually stored in AD, not in cert services, (providing they have been published of course!)
P
28/06/2019
George, did you complete your migration? I’m seeing some sources (https://social.technet.microsoft.com/wiki/contents/articles/37373.migrating-ad-certificate-services-from-windows-server-2008-to-windows-server-2016.aspx) saying you can’t migrate CA from 2008 to 2016, although the source wasn’t clear whether 2008 or 2008 R2. I wanted to know if you were successful with your 2008 R2 to 2016 CA migration; I’ll be making that leap here soon as well.
OB
08/07/2019
::bump:: please
I have the same question, thank you.
08/07/2019
I ended up finding this today from technet, according to this article 2008 R2 can be migrated to 2016 / 2019.
https://techcommunity.microsoft.com/t5/ITOps-Talk-Blog/Step-By-Step-Migrating-The-Active-Directory-Certificate-Service/bc-p/700730#M270%3FWT.mc_id=ITOPSTALK-blog-abartolo
20/06/2019
Any downtime for this? Considering doing this during the day.
20/06/2019
Only for the PKI service while you swap over 🙂 Users probably won’t even notice.
30/07/2019
Worked on 2019 as well
13/08/2019
Can you install the new CA role but not restore the services prior to doing the swap? Would speed up the process not fully removing old and then installing new etc.
16/10/2019
It is not possible because:
It is important to remove the CA role service from the source server after completing backup procedures and before installing the CA role service on the destination server. Enterprise CAs and standalone CAs that are domain members store in Active Directory Domain Services (AD DS) configuration data that is associated with the common name of the CA. Removing the
CA role service also removes the CA’s configuration data from AD DS. Because the source CA and destination CA share the same common name, removing the CA role service from the source server after installing the CA role service on the destination server removes configuration data that is required by destination CA and interferes with its operation. The CA database, private key, and certificate are not removed from the source server by removing the CA role service. Therefore, reinstalling the CA role service on the source server
restores the source CA if migration fails and performing a rollback is required. See Restoring AD CS to the source server in the event of migration failure.
17/10/2019
I’ve seen a couple different takes on this…
One states that the removal of the CA roles on the one server is absolutely necessary prior to adding and configuring them on the replacement server.
Another states that one can simply force the one server offline (e.g. disable the NIC) so it’s not available when the replacement server comes online.
You clearly take the first position, and it makes sense. It’s a bit nerve-wracking, even with the rollback options, but it makes sense.
Question: If the replacement server has a different hostname, and the certificates show the original server’s hostname as part of their CRL Distribution Point, will the steps in this article account for those, or will I need to take additional steps such as creating a CAPolicy.inf file?
Alternatively, I’ve considered just making a separate DNS entry for the old hostname pointing at the new IP.
13/08/2019
Excellent ! I would have never figured that out, especially the registry modification.
Move a 2012R2 over to 2019 Server not issues.
20/08/2019
Some articles say to change the name of the new CA Server to match the old CA server after you decommission the old CA server… so this is NOT necessary right? The only thing is the new server name will not match the CA name right? Oh and you would not need to modify CAServername registry entry….
22/08/2019
I don’t (usually) and I’ve never had a problem?
P
18/01/2020
You can’t. The add roles/features wizard specifically states that once you add the CA role, you can’t change the hostname and or domain afterwards.
26/08/2019
Thanks for the article, good work!
What about the AIA and CDP distribution points, and the CRL urls? Do you need to do anything to those to change them etc?
27/08/2019
That is a great point! If you are retaining the server name, things like AIA will probably be the same, but CRL and OSCP may well need to man manually recreated (with the same paths, or changed to the new server name).
29/08/2019
Thanks the article is very straight forward. My question as I prepare to move my CA to a new server is how do the clients find the CA?
If the CA was one name or on one server how do they find it when I move to a new server with a different name?
Thanks,
Dave
29/08/2019
They will find it in Active Directory 🙂
29/08/2019
So it will replicate the changes with AD?
I only ask because its a huge move considering if things don’t work my users wont be able to login.
And thanks so much for taking the time to answer me.
29/08/2019
Even if you are doing 801.x authentication the root CA cert will be the same, all previously issued certs will remain trusted. 🙂
11/09/2019
Awesome, thank you so much
12/09/2019
Is it safe to assume same steps would work migrating from 2008 R2 to 2016 Server?
I already have prepped 2016 server that is domain joined.
Would you also recommend making it a domain controller since my 2008 CA is also a domain controller
with schema master role assigned? I was planning on moving that role ahead of time, but should I still make it a domain controller ?
Thank You
16/09/2019
Yes in fact I’ve done it in anger 🙂
22/09/2019
PeteLong when you say Yes to Luke, which question are you saying Yes to? I was thinking of taking this opportunity to move my CA off of my 2012 DC and moving it to a member server. Everything I see says to keep it off of a CA so that is why I’m looking at it.
I was thinking I could bring up a new DC2019 and then demote the DC2012 (that has the CA on it). Now it’s just a member server. I could then install a new MemberServer 2019 and move the CA from the 2012 server to it.
What are your thoughts on this process?
23/09/2019
I mean the upgrade/migration process will work.
I don’t recommend making it a domain controller, (unless you have no choice).
Treat migrating domain controllers and migrating CA’s as a separate thing!
24/09/2019
I have something similar to this but I wanted to see if someone can comment on this: i have a CA server on an old 2008 R2 enterprise domain controller which I want to retire I also have two additional one is 2012 R2 and the other one is a 2016. all roles are managed by the 2012 DC
is it advisable to just install CA services on both 2012 and 2106 DCs and retire the 2008 DC or do i need to migrate the DB from the 2008 into one of the other two domain controllers?
Any feedback would be greatly appreciated. thanks, Wil
24/09/2019
Migrate the Root CA, then simply remove the CA roles from the SubCA servers and create some new ones, take a backup of them before you kill them in case you need to retain the intermediate CA certificates for any reason (i.e. 802.1x, or NDES, or appliances you manually put certificates on).
P
14/10/2019
What an excellent article. I’ll be using this as a guide to migrate a 2012 R2 CA to 2016 this week.
One quick (I hope) question: We’ll be changing the hostname and IP address of our CA. Is it strictly necessary to remove the CA roles from the original CA prior to installing those roles on the new CA? Or, can the original CA be shut down pending successful migration?
14/10/2019
Well no it’s not strictly necessary, but the CA can only exist in one place, the sever-name and the CA name are NOT the same, as soon as the CA is imported and online on the new server it CANNOT be online on the old one 🙂
P
14/10/2019
Perfect. Thanks again! Sounds like the best way to ensure some fallback plan (or management peace-of-mind, anyway) is to disable the NIC on the server hosting the old CA so, even powered on, it can’t talk to others. Out-of-Band-Management is obviously key to being able to do this.
Then, once we’ve got green light on the new CA on the new server, we can remove the roles from the old server.
30/01/2020
Even easier to disconnect Ethernet cable from old server. 🙂
22/10/2019
Thank you
31/10/2019
Thank you for a great article. Worked perfect. Just a quick comment, I had CNAME’s for CRL and AIA in my local DNS pointing to the old server hostname. I updated those to the new server hostname.
15/11/2019
When installing CA on the new server, when I go to configure it, the option for Enterprise CA is grayed out. Do you know why that is?
18/11/2019
Is it already a domain member server?
21/11/2019
We have root offline CA (Non Domain Joined) and Intermediate CA (Domain Joined) both are on 2008 R2
can we follow same process to migrate both server?, first migrate Root offline CA to 2019 and then migrate intermediate CA to 2019
is there anything else required.
21/11/2019
I’ve not done this, but I don’t see why not, as we are moving the CA, not the server. You can Test it in a virtual sandbox, but I can think of any problems.
25/11/2019
work this on domain controllers servers ?
i have DC where is running CA and need migrate to new server with new FQN name.. but CA name will be same as old..
thanks for help 😉
25/11/2019
The fact its a DC does not matter its the “CA name” you are moving 🙂
06/12/2019
Correct me if I am wrong – it may be a good idea to make a note of and then remove all certificate templates on the old server prior to taking a backup of the existing CA to ensure that no certificates are issued between the time you take the backup on the original server and restore on the new server. The templates could then be re-added after the restore is done.
06/12/2019
Templates don’t live on the CA server, they are stored in AD, that’s why if you have a lot of domain controllers, you need to wait a few minutes before you can issue a ‘new’ template. You are waiting for domain replication to occur.
13/12/2019
Perhaps I was not as clear as I could have been. I was suggesting that you could unpublish the templates to prevent certificates being issued between the moment you take the CA backup and disable/remove Certificate Services on the old server. The chance of this happening is small, but couldn’t it result in an ‘orphan’ certificate being issued?
16/12/2019
The worst that would happen is you would not be able to revoke it.
13/12/2019
Everything seems to have worked except the registry import, is it a requirement or can we run without it?
16/12/2019
No you definitely need that to work!
16/12/2019
Great information!
My team and I are ready to execute this Migration from a 2008 Server to a 2012R2. Our main concerns are:
1. If the server has a different name, even if we change the name in the registry export to the new name, how does that affect any currently issued certificates with the old name embedded into it?
2. How do you get all computer objects on the domain to update the certificate once the new cert is up and running?
I’m a bit novice to Managing a Certificate Store, but the project is mine to undertake and i certainly want to learn, so please Jedi Masters, give this Padawan Guidance! Thanks!
16/12/2019
1. Man Im sure I’ve mentioned this six thousand and seven times, stop worrying about server names, server names are not important at all, you are moving the CA name. So changing the server names affects nothing.
2. Assuming your computers are auto-enrolling, (if not then they wont have any certificates?) then they will renew from the CA NAME which they will find in active directory, and which hasn’t changed from the last time they got a certificate, it’s just on a different server 🙂
Imagine ‘Boots the chemist’ moves from the middle of town, to the out of town shopping centre, your question would read how do we buy paracetamol now Boots has changed its address.
P
17/12/2019
PeteLong, If the server name is irrelevant, then why is the cert server name embedded in the local workstation and server certificates? See the ProdCert1v server name in the certificate below:
(ldap:///CN=xxxxxxxxx%20xxxxxxxxxxxx%20Certificate%20Authority,CN=PRODCERT1v,CN=CDP,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=xxxxxxxxxxx,DC=com?certificateRevocationList?base?objectClass=cRLDistributionPoint)
17/12/2019
Thats a CRL pointer.
18/01/2020
It’s the CRL URL in your reference, the person that originally installed that chose that URL/hostname. If you wish to support existing CRL lookups using this FQDN it either needs to be replicated or redirected from the original server.
However, within an AD environment LDAP is used first. This is why if your CA services non-domain members, it’s probably best to remove the LDAP location and just use HTTP to speed up resolution.
Hope this makes sense!
26/12/2019
To PeteLong…. Thank you!
Christmas Gift for me to have an easy path!
30/12/2019
Very Clean walkthrough. Thanks
02/01/2020
Hi,
I am in process of upgrading existing CA environment – 2008 -> 2019. Offline Root CA and 3 domain member SUB CA’s. After upgrade I will only need one SUB CA.
My idea is to migrate the Root CA using backup/restore as described here to a new server with new name (I think straight forward). On the current 3 SUB CA’s I want to disable auto-enrolling – and keep them alive until latest issued certificate have expired. Install a new sub CA with with auto-enrolling enabled?
Any pitfalls doing it this way?
Torben
02/01/2020
Not that I can see, as long as they are left up for the same amount of time that the certificates are valid 🙂
07/01/2020
This worked well for me thank you. On the original CA I had created a “User VPN” template for auto-enrollment. I am not sure if it was necessary, but I did reissue this certificate template on the restored CA. The User VPN template was not listed until I had selected “New -> Certificate Template to Issue”
07/01/2020
Thanks for the slick write up. I really appreciate this and the other articles you have contributed to the community Pete!
Sam
07/01/2020
Thanks Sam!
08/01/2020
Pete,
Great work, great write up.
Quick question.
I’m planning on upgrading a rootCA and a SubCA (2008r2 to 2019).
I follow the steps that you laid out for the root, I understand that.
What about the sub?
Do I do the same (ie backup the sub and the sub’s reg then restore to 2019)?
Or did I see in the comments to just install a brand new sub (even though many certs issue from sub)?
Thanx!
09/01/2020
Same procedure for the SubCA if you want to migrate it, you can also create a new one just as easy 🙂
09/01/2020
Great write up Pete!
Just a quick question, We have our CA on a 2008 DC which we want to decommission and shut down for good. Once we move the Certificate Services over to a new domain member server are we able to then demote the DC and then kill the server for good?
Just wanted to check demoting and killing the server wouldn’t cause issues with the CA on the new server?
09/01/2020
Yes – providing theres nothing else on it (DHCP, DNS, Terminal Services Licence server etc,)
09/01/2020
Put me in the same boat as those scrambling to remove 2008R2 servers from their environment. Followed these steps last night. All quiet in the office today. Would add that i was seeing errors in ‘pkiview’ referencing the old CA server, and i needed to publish my revoked certificates and then refresh the pkiview screen and that cleared those.
im still getting ‘unable to download’ on the delta crl #3 and cdp location #2 where the location is file://NEW_CA_SERVER….. but if i copy the url and browse in explorer its working, so not sure what to do there
in any case, kudos to PeteLong for actually reading and responding to so many people, after this post has been up all this time. top bloke!
10/01/2020
Thanks Jono M8!
10/01/2020
I have a Server 2008R2 and CA is running on a DC. I am planning to move CA role for DC to on its own new 2019 Server. Hostname will be different. Do I need to change any registry value if it has a different hostname? or do I need to perform any further steps apart from what is in the article.
Thanks and very helpful write up.
10/01/2020
Yes you DO need the change the server name in the registry key backup, to the new server name 🙂
P
19/02/2020
I am having the same idea like Bhav. I have a 2008DC with CA Role installed. I want to take the CA Role out and put it on 2019 Server with different hostname. Could you tell me how to change the server name in the registry backup?
24/02/2020
That information is in the post.
10/01/2020
Hello pete
First of all thx for the guide, will help a lot to guys like me that do not usually play with CA’s, are on a small business and have an inherited problem from his predecessor.
what you would recomend in a case that there is a CA server on a w2008r2 DC with a cert using a deprecated SHA1 hash algorithm?
first migrate it using your guide to a w2019 and then upgrade the SHA1 cert to a SHA256 or
First upgrade the SHA1 to SHA256 and then migrate to the new server?
Just check it with certutil -store my the provider is Microsoft Software Key Storage, so at least i dont have to upgrade from CSP to KSP, which is a little relief.
10/01/2020
Great Question!
You can do it either way, I personally would sort the SHA1 problem out first, but theres no reason at all not to do it the way round you suggest.
And thanks for the feedback!
17/01/2020
Thanks for the great article. My brain is teflon when it comes to retaining CA knowledge. Definitely one of my weaker skillsets.
I’m not sure this was made clear in the comments posted, so I’ll spell it out just in case.
Firstly, one of my pet peeves is when people don’t quote R2 when talking about that version of Server 2008. Where I work we have a Windows Server 2008 migration project when the vast majority (if not all) are 2008r2 – drives me crazy.
Anyway, since I don’t want to assume all comment posters are good techies and referencing their OSes properly in their questions, I want to clarify:
If you have Windows Server 2008 CAs (not R2) and you want to migrate to 2016 or 2019, you MUST first do a migration to 2012r2
If you have 2008r2 CAs, you can go straight to 2016 or 2019.
18/01/2020
I’ve updated this post (above) and linked to what will happen if you attempt to upgrade 2008 (non R2) to 2016/2019.
Pete
23/01/2020
Hello.
Can we use this procedure for a subordinate CA?
Should we start updating root ca first or it does not matter?
23/01/2020
Hi Victor, I would always do the root first, but that’s just my OCD. I cant really think of a good reason not to do it that way, as its a hierarchical system.
24/01/2020
Pete,
This was an absolutely great article and made going from a Server 2012R2 DC CA to a 2019 one easy-peasy-lemon-squeezy.
Thank you for such a well-written article.
27/01/2020
Thanks for the feedback Doug 🙂
P
26/01/2020
Awesome post – thanks for that…Just one stupid question (since I followed your post exactly), for peace of mind, what is the best process for verifying the migration was successful?
It’s noon on a Sunday, all my CA skillset is horrible…Thanks …/Mike
27/01/2020
Request/Issue a certificate is the simplest way to test the system. 🙂
29/01/2020
I’m about to do this migration but i do have a question. Do i need to export the Certificate Templates from the 2008r2 server and import them into the new 2016 server? I cant find anywhere online if that is needed to be done
29/01/2020
I think I mentioned this above, templates are stored in Active Directory NOT on the CA
P
04/02/2020
Thanks you for this article. I am retiring a site hosting a virtual subordinate CA server. I am wondering if cloning the CA server, restoring it to the new VM infrastructure and re-IPing will cause an issue? Or, build a new CA in the new site and following your above process. Thx so much.
04/02/2020
As long as you don’t change the server name, and remember to add the new subnet to ‘AD sites and services’ you should be ok 🙂
12/03/2020
Hi Pete, this is a great article. Thank u for replying to all guys. I have a question ref migration from CA 2008 r2 to 2016. After we remove the CA role from the 2008 r2 dc and install on 2016. We want to keep the old server as it is a DC for maybe a few weeks after the migration. Is it necessary to power off the server after CA migration or can we simply keep it running without the CA role and act as a backup DC? Appreciated
13/03/2020
No the old server can remain, that’s fine as long as i’ts got a different name of course 🙂
18/03/2020
Hi
Thx very much for your wonderful article.
When moving from 2008r2 to 2012r2/2016/2019 AND with different hostname is it required to reissue the template certificate ?
I see as per official microsoft doc that is a require step BUT You don’t mention it on your article
18/03/2020
NO templates are stored in AD! (I’ve updated the article to show you where).
P
18/03/2020
Like many I have a PDC that is AD CS. I would like it to remain the AD CS and remove AD DS. Is there any reason you can think of that I wouldn’t be able to transfer the FSMO, demote and remove ADDS and leave the CA installed?
19/03/2020
None at all, what you propose wont be a problem 🙂
02/04/2020
I don’t think you can Demote a DC while its a certificate server
02/04/2020
You are correct attempting to demote a DC running CS will result in it stoping, and asking you to remove Certificate Services first.
P
03/05/2020
Hi, is it supposed that is possibile to demote the OLD DC holding the CS AFTER the migration on the new server (with different hostnames) . In other words: is it safe to remove the cs service from the old server once the new server with the new cs is up and running in production ? Thx
06/05/2020
You cant demote a DC if its a CS Server it will not let you. Migrate CS, when that’s done demote the server.
01/04/2020
Hey Pete,
First off, a big thanks the excellent guide.
I was just wondering if you also know if I could change the displayed name in the CA management console, just so no confusion arises amongst my coworkers for example.
Changing the ‘Active’ and ‘Common Name’ REG_SZ keys in the Configuration registry settings as well as the name of the registry folder caused ‘file not found’ errors when trying to restart certsrv.
Would be awesome if you know a trick for this!
02/04/2020
This is why I name my CA’s differently to the Hostname(s) they are residing on 🙂 ASFAIK (and I’m happy for someone to pitch in and say I’m wrong,) you can’t change a ‘CA Name’ You would need to remove it an create a new CA, which has many other inherent pitfalls in a working domain.
02/04/2020
Thanks for the excellent article and video Pete. I will use it for our next migration
09/04/2020
Thank you for the article, great help, i did notice on the server that you were migrating to that Active Directory Services was also selected in the screenshot, is this required? I am migrating the CA from an existing Domain Controller which I am also demoting, i believe that this needs to be done prior to that. With the new server, i just want to confirm if AD services are also required?
10/04/2020
No it’s not, that was done on the test bench and it saved me building two servers.
11/04/2020
Hi Pete
As suggested just trying to the backup of certificate server on windows 2008R2 ent. But wizard completes with an error that some of the CA server certs private key is unexportable. I even checked the certs in certificate MMC for computer account and cant even export them from there.
Error is like windows cannot backup one or more private key because CSP doesnt support key export.
would you know something about this.
thx
shishir
25/04/2020
Thank you Pete for your detailed articles and they have been a life savor!
I have recently moved a Windows 2008 R2 CA to a new Server 2019 OS with a new host name. The move went well with one major issue. I am unable to create a SHA-2 CA cert and on SHA-1. This is causing all of our internal sites and other issued certs to issue Weak Cipher warnings and other issues.
I noticed in the registry the item “CAServerName” has the imported old 2008 R2 OS host name since that was exported and imported into the new 2019 CA. Is it safe to stop the certsvc, update the Reg key “CAServerName” and start the service if this is already issuing certs?
The CSP Reg key already has a CNGHashAlgorithm of SHA256 and Provider of “Microsoft Strong Cryptographic Provider” data set.
28/04/2020
I’ve covered upgrading CA’s to SHA2/256 elsewhere on the site?
12/05/2020
Hi Pete,
Is it possible to migrate a subordinate CA before RootCA? I am planning a migration for CA roles from 2003R2 to 2012R2 and wondering if I Can migrate the Subordinate CA server before the RootCA server?
15/05/2020
Technically yes, as long at its SubCA certificate stays in date through the procedure, but I’ve never done it that way.
12/05/2020
Excellent post and I really admire the way you addressed everyone’s questions:
I have a question…
For future management and ease of upgrades, we wanted to separate CA from a 2016 serverA DC, which is also has other roles like (DHCP and DNS), to a newly built 2016 ServerB,
1. Is it possible to keep both ServerA and ServerB After migration following your post?
2. If it is a must to rename the source server ServerA, what would be your suggestion/recommendations? s there a clean way to do it?
15/05/2020
1: Yes
2: Assuming it’s not doing something important (like Exchange or SQL for example,) then simply rename the server, (and then reboot it, to reregister its DNS entries). Then check your DNS servers do not have any old ‘static entries pointing to the ‘old’ name.
13/05/2020
Man I am dying here…
Cannot renew NPS Cert. Because the CA Certificate templates was showing the server I was going to move it to I thought that was probably the problem. So I went ahead and moved it to that machine even though it isn’t where I would like it to reside. It is now on server2 and the templates reflect server2 but I still get the same error when NPS trys to renew. “The requested template is not supported by this CA”. A valid certification authority (CA) configured to issue certificates based on this template cannot be located, or the CA does not support this operation, or the CA is not trusted.
Man I could use some help. There is so little info on the internet.
13/05/2020
Figured it out. For some reason the Backup and restore process did not restore all of the Certificates to Issue area of the CA, and since I originally set it up 7 years ago an essential piece of basic CA setup was forgotten. Although the template for NPS radius was in manage certificates, it was not in the main window when clicking on the manage certificates folder for certificates to issue. Now in my defense, this was available in the certificates to issue area of the original CA. Why it didn’t transfer with the backup/restore process i do not know.
13/05/2020
When moving CA back to 2012 Server that is now NOT a Domain Controller, The ability for the CA to issue an NPS RADIUS Certificate goes away. When you manage certificates you can see the template, but you cannot add it to the Templates this CA can serve. It would appear for a CA to issue NPS Radius Authentication Certificates, the CA must reside on a DC.
15/05/2020
I’m pretty sure the CA does NOT have to be a DC, in fact in my example here, the CA and NPS server is on the same server and its NOT a DC and it worked? https://www.petenetlive.com/KB/Article/0000685
18/05/2020
Hi Pete
Hope you’re well.
Can i use this guide to migrate from a 2012 R2 to 2019 standard? The 2012 R2 is also a DC plus DHCP and obviously DNS so i’ll need to migrate all roles to the new 2019 Server
Thanks
18/05/2020
Yes treat each migration separately, and don’t move the DC role until after certificate services has moved, I’ve covered DHCP migrations, (use the search above) and DNS will move with the DC role.
18/05/2020
Hi Pete, great article and youtube video, thank you! I think you might laugh and cringe at the same time when you read this question. My boss threw me into the middle of their CA migration project and wanted me to finish it up, problem is they just stood up a brand new Root CA server while leaving the old Root CA still up and running (we dont have any subordinate CAs). They began creating new certificates for just the web servers we host on the new CA. After reading your article and many others I told them to pump the breaks!
My question is, on a scale from 1 – 10 how screwed are we? What would happen if we continued with the new CA and just turned off the old one? Would all the servers and client PCs auto enroll with the new CA? I just want to understand the implications of the direction we took. Thank you in advance.
18/05/2020
🙂 Theres no reason I can think of that you are ‘screwed’, essentially as long as your clients trust BOTH old and new root CA servers and the CRLS stay online then nothing will break?
18/05/2020
GREAT news to hear! As of right now all clients trust both CAs. So if we turn off the old CA and all the servers check in with GP, will they all auto-enroll with a new certificate from the new CA? No moving of the old database and reg key required?
18/05/2020
Yes, just make sure if theres a CRL stamped on certificates issued by the OLD CA Server, you will need to maintain that until all the certs issued from that CA server have expired, or are no longer needed.
02/06/2020
Thanks for sharing the steps to move CA, I need to move the CA root server from 2003 to 2019 OS and we have a CA subordinate which is on Active directory server, can follow the same steps for 2003?
Could you help me to upgrade the hash algorithm as well from SHA1 to SHA2.
02/06/2020
Wow 2003? Back then I wasn’t that deep into this stuff, I’d need to build it all in VMware and test it, Sorry I just dont have the time to work that out for you.
02/06/2020
Logically I think it is possible only I am worry about CA Database Jet engine whether it will be directly migrated on 2019 or I have to go thru 2003>2008>2012>2019, not sure but what is your opinion on this?
02/06/2020
Agree I’d go to > 2008 > 2008R2 > 2019 personally
10/08/2020
Keep in mind Microsoft’s upgrade recommendations. While it may be technically possible to upgrade in-place from 2008R2 > 2019, the new supported method is only upgrading from 2 versions back. (i.e. should only upgrade to 2019 from either 2016 or 2012R2)
https://docs.microsoft.com/en-us/windows-server/upgrade/upgrade-overview#which-version-of-windows-server-should-i-upgrade-to
01/07/2020
Hi there,
Many thanks for sharing your knowledge.
I am in a process of migrating our cert role from Server 2008 32bit, upgrade to 2008R2, then migrate the role to server 2016, but it seems that the architecture is not compatible.
Do you happen to know a way i could follow for this migration, please?
Regards
Tedy
02/07/2020
Ah OK – If you are 2008 x32 you need to migrate to 2008 x64, then migrate to 2008R2 (Google “Active Directory Certificate Services Migration Guide”)
16/07/2020
Thank you for the guide, like many others Im on the same boat working on upgrading RootCA with two SubCA and another RootCA their all in 2008 R2 and your guide is a great help in this endeavor. I have been reading a lot of guides and really I would like to side with caution and try upgrading them in stages from 2008 R2 to 2012 R2 then 2019 and instead of migrating/moving them to a new server or upgrading them one time to 2019. I dont think its an issue whichever route we take in place upgrade vs backup and restore to a new server but wanted to get your thoughts on it.
Also our DC is currently running on 2012 R2 would it be an issue if CAs are ahead?
17/07/2020
Hi Jonathan,
Indeed, you are only as good as you last backup! Your DC wont be a problem, and wont trip you up.
If you super cautious P2V (or V2V) the boxes and, sandbox the upgrade to test it first.
As you are at 2008R2 then theres no ‘gotchas’ as you are running on a newer DB, and wont be x32 bit.
Good Luck
P
21/07/2020
Successfully migrated ADCS, CA and CAWE from 2012 (DC) to 2019.
Thank you very much
08/08/2020
First of all, thank you for the article, very useful.
I have a different requirement, however: the environment I manage has a root CA (not-domain joined server) and a dependent subordinate CA, not autoenrolling. I need to get rid of both, as we have a new enterprise-wide offline root CA and in this particular environment I want to replace the existing subordinate CA with another having different root CA, different name (and different server name). The number of certificates issued by the old sub CA is quite low, indeed all of them need to be gradually ceased as well as the hosts requesting them (we are in a migration phase).
Can the new sub CA, depending on a different root CA (a new PKI, indeed), coexist with the dying PKI until all the old stuff is made obsolete? Or would the AD get messed by that?
Thank you very much.
11/08/2020
Yes of course, you can run the new alongside the old until such time as all certificates have expired to been revoked.
11/08/2020
Thank you very much for this Pete,
I re-read the article and comments here and had most of my questions answered. I do have a question however regarding moving the CA off of a domain controller that we plan on keeping around. Is it possible to keep the domain controller with the same name moving forward after migrating the CA services off of it over to its own member server?
Thanks again.
12/08/2020
Either will work 🙂
14/09/2020
Hi Pete,
We’re planning to migrate our CA from 2008 R2 Ent server to 2019 DC. Just a couple of points, as I haven’t done so in a relatively large/complex environment.
We also have NDESinstalled. Also SCEP service for Macs. Are there any consideration to be taken around this?
Also, what would be the rollback scenario of this (backup/restore to new server) scenario if things do not go at planned?
Thanks for your advise in advance.
15/09/2020
Awesome question – NDES can be a pain, especially if you are using it for anything Cisco related? If you are only using it for macOS then just check that it will support the cyphers in the new environment, macOS can be a bit picky (or more secure depending on your view). Id p2V the DC/CA Servers and sandbox them and give it a thorough testing before going live.
Good Luck
07/10/2020
Hi, Peter.
Thank you for the great article!
The CA I’m planning to move to other server is using HSM. So the Private Key is being kept on HSM and I will be able to export the key to the new server from HSM.
Do I still need to check the ‘Private key and CA certificate’ check-box when creating the old CA backup?
Thank you.
08/10/2020
I’ve not done the with an HSM – but I dont see why not?
17/11/2020
Hi Pete, great guide thank you! I have just followed to the letter and I cannot seem to create new templates, nor can I see the ones visible. This is in a lab environment which I tested moving from DC to its own dedicated server. Equally, the web enrolment references the old server which I cannot seem to change…I am not sure this migrates in the typical sense.
17/11/2020
Templates actually live in AD not on the CA server! If you migrated and can’t see them, the templates have not moved!
17/11/2020
Thanks for such a prompt response. I can see the certificates on the DC via ADSI edit. When trying to Manage the templates I get an error “Windows could not create the object identifier list. The specific domain either does not exist or could not be contacted. Certificate templates are not available.”
Any other nuggets of help would be highly appreciated.
17/11/2020
And the new server is a domain member, and in the correct AD groups, and has the correct DNS settings, and you are logged in as an admin?
23/11/2020
Hi Pete, echo everyone else’s thanks for a clear, concise article/video and for taking time to answer follow-up questions.
I recently moved a domain off an old SBS 2011 server to 2012R2 Standard. I followed your steps to migrate the CA and it all went swimmingly… or so it seemed, until I realized that all of the existing certificates now have invalid CDP paths. This was of course after removing the CA role from SBS (in addition to every other role), removing it from the domain and powering it off for good.
I wish I had seen and followed your recommendations on setting up an http path way back when, but was (and still am) quite ignorant and just used the SBS default configuration, which only included an ldap URL for the CDP.
I’m wondering if I have any options other than reissuing all of the existing certificates. I tried setting a CNAME in DNS to point the name of the old server to the new one, but this didn’t appear to make any difference–perhaps that’s only works for http CDP paths?
Is there any way to redirect the ldap path to the new server? Or am I stuck with having to reissue the existing certificates?
Here’s what the CRL Distribution Points field looks like now on all the existing certificates:
[1]CRL Distribution Point
Distribution Point Name:
Full Name:
URL=ldap:///CN=mydomain-SBSServer-CA,CN=SBSServer,CN=CDP,CN=Public Key Services,CN=Services,CN=Configuration,DC=mydomain,DC=net?certificateRevocationList?base?objectClass=cRLDistributionPoint (ldap:///CN=mydomain-SBSServer-CA,CN=SBSServer,CN=CDP,CN=Public%20Key%20Services,CN=Services,CN=Configuration,DC=mydomain,DC=net?certificateRevocationList?base?objectClass=cRLDistributionPoint)
Seems the problem is the CN=SBSServer part.
Many thanks.
24/11/2020
http CDPs you can just setup a new one with the old URL. LDAP ones will only be a problem if the web CDP does not work, I’m pretty sure it does not need to check all of them?
17/12/2020
This is hte second time I have used this post to move my CA. 6 Months ago to a temp server, now to a new server. This time however the server is 2019 and it broke my NPS. I added a new host after moving the CA and it got a certificate. The NPS worked for 36 hours but fails now because the CRL is not found. Even the new host, with the certificate issued by the new server is failing. Not much info out there on how to fix this. ANYBODY???
14/01/2021
Hi Pete, great post!
I’ve adopted a network that has a CA on a 2012 dc. While doing the backup, I got the message that one or more private keys could not be backed up because the keys cannot be exported. It turns out they are the CA’s main 2 certificates also mentioned in CACertHash in the registry. I can’t seem to export them with their private keys. I am not aware of any passwords for them, as the previous admin was not big on documenting. Can I still restore the CA with the information that was able to be exported, or would it come down to creating a new CA?
Thanks man!
14/01/2021
It it were mine I’d build a new PKI infrastructure, take a note of the last issued cert expiry date of the old one. Then kill the old one and remove it from AD at a sensible date.
(Stop and disable the services on the old one to stop it issuing new certs!)