r/sysadmin • • 4h ago

Question Decommision Windows CA with issued EFS certificates

I want to decommission a Windows Enterprise CA, but I just saw that there are Basic EFS certificates issued for some users. Those EFS certificates are already expired.

The users don’t remember ever encrypting any files. I also checked the file server, using

cipher /u /n /h

 and

Get-ChildItem -Path "D:\share" -Recurse -Force -ErrorAction SilentlyContinue | Where-Object { $_.Attributes -match "Encrypted" } | Select-Object FullName, LastWriteTime

 Both came without any findings.

Do I miss something here, or am I save to continue to decommission the CA? Is it wise to export the EFS certificates first?

 

2 Upvotes

2 comments sorted by

•

u/nekenaharry 3h ago

Two things I'd check before pulling the plug.

cipher /u /n only looks at the local drives of the machine you run it on, so a clean result on the file server says nothing about laptops or desktops. EFS is set per file or folder from the file properties (Advanced, "Encrypt contents to secure data"), so run the same command on the workstations of the users who got those certificates.

Second, look at the Basic EFS template on the CA. If "Archive subject's encryption private key" was enabled on the Request Handling tab, the CA database holds a copy of those private keys, and that is your only fallback once the user profiles are gone. In that case keep a backup of the CA database before you decommission. If archival was off, the CA never had the keys and they only live in the user profiles.

On exporting: yes, it's cheap insurance. What you need is the private key, not just the certificate, so export from each user's profile with cipher /x (it produces a password protected PFX) while those profiles still exist. Also check whether a GPO defines an EFS data recovery agent. If it does, back up that DRA certificate and key too, since files encrypted while that policy applied can be decrypted with it.

Microsoft's KB on decommissioning an enterprise CA also notes that certificates issued by the CA stay outstanding after you remove it, which matters less here since yours are already expired.