Import the original EFS .pfx into the current user’s Personal certificate store, then decrypt a working copy of the files on an NTFS volume—not directly on the exFAT HDD.
1. Preserve the encrypted files
Do not format the HDD or modify the only copy. Copy the affected files using a backup method that preserves their encrypted EFS data, or make a full image first. Ordinary file copying while valid EFS credentials are active can produce decrypted destination files because EFS normally exposes plaintext to authorized applications.^1^
The Windows cipher utility documents its encryption/decryption operations for NTFS volumes.^2^ Therefore, create an NTFS-formatted destination and work on a copy there rather than attempting in-place EFS recovery on exFAT.
2. Confirm that the files are EFS-encrypted
On an NTFS working copy, open Command Prompt and run:
cipher /c "D:\RecoveryCopy\example.ext"
Replace the path with one affected file. cipher /c displays the file’s encryption information.^2^
Alternatively:
- Right-click the file and select Properties.
- Select General → Advanced.
- Check whether Encrypt contents to secure data is selected.
If it is not selected, this is probably not EFS, and a .pfx might be unrelated to the files.
3. Import the original PFX for the current user
The PFX must contain the private key belonging to the certificate that encrypted these files. A newly generated certificate cannot decrypt files encrypted by the lost key.
Open Windows PowerShell as the affected Windows user and run:
$credential = Get-Credential `
-UserName 'PFX password' `
-Message 'Enter the password protecting the PFX'
Import-PfxCertificate `
-FilePath 'C:\Recovery\EFS-backup.pfx' `
-CertStoreLocation 'Cert:\CurrentUser\My' `
-Password $credential.Password
Import-PfxCertificate imports certificates and private keys from a PFX into the specified certificate store.^3^
Then verify that the imported certificate has a private key:
Get-ChildItem Cert:\CurrentUser\My |
Select-Object Subject, Thumbprint, HasPrivateKey
The relevant certificate must show HasPrivateKey as True. Importing only a .cer file is insufficient because it contains no private key; Microsoft’s EFS recovery guidance distinguishes .pfx files containing the certificate and private key from .cer files containing only the certificate.^2^
4. Test one file, then decrypt the folder
Test access to one copied file first. If it opens, decrypt it:
cipher /d "D:\RecoveryCopy\example.ext"
For the complete folder and all subfolders:
cipher /d /s:"D:\RecoveryCopy"
/d decrypts files or directories, while /s processes subdirectories.^2^ Afterward, run cipher against the folder; decrypted items should be marked U rather than E.
You can also right-click a file, select Properties → General → Advanced, clear Encrypt contents to secure data, and apply the change.^4^
If the PFX is missing or does not match
Reinstalling Windows can remove the user profile’s EFS certificate and private key. Using the same account name or Microsoft account does not recreate that private key.^5^
Recovery is then limited to finding one of these:
- The original EFS
.pfx backup and its password.
- A backup or system image of either laptop’s old Windows profile containing the certificate/private key.
- An organizational EFS Data Recovery Agent and its private key, if the computer was managed by a workplace or school.
A BitLocker 48-digit recovery key is not a replacement for an EFS private key. BitLocker unlocks an encrypted volume using that volume’s metadata; it does not decrypt independently EFS-encrypted files.^6^
If neither the original EFS private key nor an applicable recovery-agent private key survives, the files cannot be decrypted through supported Windows recovery methods.
References
- Backup and Restore of Encrypted Files
- cipher
- Import-PfxCertificate-Syntax
- Personal Data Encryption settings and configuration
- how to access a encrypted a file or folder after wondows upgrade - Microsoft Q&A
- Can I decrypt my backup encrypted files without pfx certificate - Microsoft Q&A