This works identically to the Microsoft Defender Offline feature on Windows 10, but requires you create the bootable media and boot it up yourself.
Go to Microsoft website and download the offline scanner.Related: How Do I Know if I’m Running 32-bit or 64-bit Windows?
How to Run Microsoft Defender Offline on Windows 7 and 8.1