In general, power options can power down a hard disk drive after a given time. This can also be done through the CMD prompt:
- Press Windows, type
cmd, and press CtrlShiftEnter to obtain the command dialog as Administrator.
- Type each line below and press Enter to set HDD timeout on DC (battery) and AC (mains) power, where <minutes> is replaced with numbers.
powercfg -change -disk-timeout-dc <minutes>
powercfg -change -disk-timeout-ac <minutes>
Windows might still try to wake a HDD for indexing and virus scan, so exclude the HDD from indexing and from virus checks. To find what process is sctivating the disk, try a third-party tool such as Nirsoft's FileActivityWatch, which shows all reads and writes. In the Advanced settings, specify the drive letter followed by wild card, asterisk (*).

Some other options include:
- Open BIOS settings and disable the port used by the HDD. This would be a nuisance to to on a frequent basis, of course.
- Open the PC's case, find the power line connected to the HDD, cut it, and splice in a switch. Drill a hole in the case to mount the switch. This, of course, increases chances of induced noise interfering with drive operation and increases the risk of shutting the drive at the wrong time.
For an external HDD (or SSD) used only for occasional backup, it's a good idea to unplug at least the USB cable, and perhaps the power cable:
- As you desired, it keeps the drive from spinning up, and from being needlessly scanned for malware or for indexing. In addition:
- It makes it less likely that malware, ransomware in particular, damages data.
- It helps protect the drive if there is a power surge or if a nearby lightning strike induces a current.
Admittedly, this "hardware fix" might cause wear on the USB cable, though I've not found that an issue. If that's a concern, a switched USB hub could be used, such as this. Use a high-quality hub, since large backup file transfers can be slowed or interrupted with a bad hub.