Short answer: disconnect the PC from the internet, run a full Microsoft Defender scan followed by a Microsoft Defender Offline scan, quarantine everything detected, uninstall suspicious programs and remove unfamiliar startup items and scheduled tasks, then reconnect, update Windows and run a second-opinion scanner. Afterwards, change your important passwords from a different, clean device, because many trojans steal saved passwords and browser sessions. If the trojan was a remote access tool or banking malware, or keeps coming back, back up your files and reinstall Windows.
A trojan is malware disguised as something useful or harmless: a cracked game, a fake invoice attachment, a “free” software download, a fake browser update or a pirated tool. Once run, it may steal passwords and cookies (info-stealers), give attackers remote control (RATs), download other malware such as ransomware, or turn the PC into part of a botnet.

Signs of a trojan infection
Symptoms vary, and many trojans try to stay invisible. Watch for Microsoft Defender alerts, security tools being disabled or failing to open, unknown programs or processes, unexpected pop-ups or browser changes, high CPU or network usage when idle, accounts being accessed from unfamiliar locations, emails or messages sent from your accounts, or your mouse moving on its own. A recent download from an unofficial source is often the trigger.
Step 1: Disconnect and stop using sensitive accounts
Turn off Wi-Fi or unplug the network cable. This cuts the trojan off from its command server and stops it sending more data. Do not log in to banking, email or other important accounts on this PC until it is clean. If the PC is a work device, contact your IT team now.
Step 2: Run a full Defender scan
Open Windows Security > Virus & threat protection > Scan options, select Full scan and run it. Quarantine or remove everything detected. If Windows Security will not open or shows Defender disabled, see Windows Security not opening and Defender turned off by Group Policy; malware often disables protection.
Step 3: Run Microsoft Defender Offline
Some trojans hide from scans while Windows is running. In Scan options, choose Microsoft Defender Antivirus (offline scan) and click Scan now. The PC restarts into a trusted environment and scans before Windows loads, which is better at removing rootkits and persistent malware. It takes about 15 minutes.
Step 4: Remove programs and persistence
Go to Settings > Apps > Installed apps, sort by install date and uninstall programs you did not intend to install, especially remote access tools (AnyDesk, TeamViewer and similar) if you did not set them up yourself. Then check startup locations: Task Manager’s Startup apps tab, Task Scheduler for tasks with odd names that run files from AppData or Temp folders, and browser extensions. Microsoft’s free Sysinternals Autoruns tool shows every auto-start location in one place for advanced users.
Step 5: Reconnect, update and get a second opinion
Reconnect to the internet, install all Windows updates and update your browser and apps. Run a reputable second-opinion scanner from a well-known vendor, downloaded directly from the vendor’s official site. Check that Defender’s real-time protection and Tamper Protection are on.

Step 6: Secure your accounts from another device
Many modern trojans are info-stealers that grab saved browser passwords, cookies (which can bypass two-factor authentication), cryptocurrency wallets and messaging sessions within seconds. From a clean phone or computer, change passwords for email first, then banking, password manager, social media and work accounts. Sign out of all sessions in each account’s security settings, which invalidates stolen cookies. Turn on two-factor authentication or passkeys. Watch bank statements closely, and contact your bank if financial details may have been stolen.
When to reinstall Windows
A clean reinstall is the safest option if the trojan was a remote access trojan, banking trojan or ransomware loader, if infections keep returning after cleaning, if security tools remain broken, or if the PC holds very sensitive data. Back up personal files (documents, photos), not programs, and scan the backup. Then use Settings > System > Recovery > Reset this PC with “Remove everything”, or a fresh install from Microsoft’s official media.
Prevent trojans
Download software only from official sources and the Microsoft Store, avoid cracked software and game cheats, be careful with email attachments and fake update prompts, keep Windows and apps updated, use a standard (non-admin) account for daily use, and keep SmartScreen and Defender on. See handling email attachments safely.
Frequently asked questions
Can Microsoft Defender remove trojans?
Yes, Defender detects and removes most common trojans, especially with an offline scan. Persistent infections may require a reinstall.
Is my data stolen if I had a trojan?
Possibly. Assume saved passwords and browser sessions were exposed and change them from a clean device.
Can a trojan survive a Windows reset?
“Remove everything” removes typical trojans. Rare firmware-level threats are an exception.
How do I know the PC is clean?
Clean full and offline scans, no unknown startup items, and no further suspicious activity are good signs.
Related: remove a remote access trojan, remove malware from a Windows PC.



