How to Safely Restore OneDrive Files After a Malware Infection
Question details
The user needs to safely restore files from OneDrive to a newly rebuilt computer following a malware infection, keeping in mind that data cannot be automatically transferred to a new Microsoft account.
- Product
- Microsoft OneDrive
- Device & OS
- not provided
- Scenario
- Recovering personal or work files from cloud storage to a clean computer after experiencing a malware or ransomware attack.
- Observed behavior
- Files are safely downloaded, scanned, and restored without risking re-infection of the rebuilt operating system.
Ensure your rebuilt system is fully secured with current operating-system updates and active, reputable antivirus protection with the latest security definitions.
Manually Download and Scan Files in Small Batches
Use the web version of OneDrive to selectively download known files and scan them with antivirus software before opening.
Do not immediately set up the OneDrive desktop app to sync all files, as this could automatically download infected files to your clean machine. Instead, use a web browser to review your content.
Open a web browser and log into your OneDrive account. Review your files visually to ensure no obvious signs of corruption or unfamiliar file extensions exist.
Select only known, necessary files or folders and download them to your computer in small batches rather than downloading everything at once.
Use a reputable antivirus software or an online scanning service (such as Norton, McAfee, or Bitdefender) to run a manual scan on the downloaded files before you attempt to open them.
Use the Restore Your OneDrive Feature for Ransomware
If you suspect your files were corrupted or encrypted by ransomware, use OneDrive's built-in restore tool to roll back to a previous clean state.
Edit Your Recovered Files Safely with WPS Office
After recovering your documents from OneDrive, you need a secure and lightweight office suite to view and edit them. WPS Office is an excellent free Microsoft Office alternative that protects your system performance while offering seamless compatibility.
- 1. Download and Install: Download WPS Office for free and install it on your newly rebuilt, malware-free computer.
- 2. Open Recovered Documents: Launch WPS Office and safely open the files you downloaded and scanned from OneDrive.
- 3. Edit and Save: Edit your documents seamlessly with full Microsoft format compatibility and save them securely to your local drive or cloud.

Frequently Asked Questions
Can I transfer my OneDrive files and Microsoft 365 subscription to a new account to avoid the malware?
No. Microsoft 365 subscriptions and OneDrive data generally cannot be transferred automatically between Microsoft accounts. You should preserve access to the original account, clean the files, and contact Microsoft Support if you encounter account access issues.
How can I check if my OneDrive files are infected before downloading?
You cannot completely verify a file's safety just by looking at it in the cloud. You must download the files in small batches and immediately scan them with updated, reputable antivirus software (like Norton, McAfee, or Bitdefender) before opening them.
Is it safe to turn on automatic OneDrive syncing immediately after rebuilding my computer?
No, it is highly recommended not to turn on automatic syncing immediately. If infected files are still in your cloud storage, they will automatically download to your clean computer. Always review and restore files manually through the web browser first.
What should I do if my OneDrive files were encrypted by ransomware?
If your files have been encrypted or corrupted by ransomware, use the 'Restore your OneDrive' feature available in the web version of OneDrive. This allows you to roll back your entire OneDrive to a previous time before the ransomware attack occurred.




