No, but there is a way to do it without additional software.
1. Open Event Viewer
- Navigate to Applications and Services Logs\Microsoft\Windows\DriverFrameworks-UserMode
- Right-click Operational and click Enable Log
2. Plug in your USB
- Refresh the logs and take note of the Event IDs under the "Pnp" category; mine are 2100, 2101, 2105, 2106
- Also take note of the letter drive of the USB; mine is F:
3. Unplug your USB
- Refresh the logs and take note of the Event IDs under the "Pnp" category; mine are 2100, 2102
4. In your desired directory, right-click -> New -> Text Document
- Enter the following in the text file
Code:
@ echo off
"C:\Program Files\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File F:\
Pause
- Replace the "F" with your USB drive letter and Save
- Back in the directory, click View and checkmark "File name extensions"
- Rename the file to USBScan.bat, or whatever you want it to be called, but it should have the .bat extension
5. Open Task Scheduler
- Click Create Task
- Name it USB Scan or whatever you want
- Go to the Triggers tab and click New
- Change "Begin the task:" to "On an event"
- Under settings, click Custom and then New Event Filter...
- Under Event Level, change "Event logs:" to "Operational" by expanding Applications and Services Logs\Microsoft\Windows\DriverFrameworks-UserMode
- Change "<All Event IDs> to all non-overlapping Event IDs from steps 2 and 3; mine are 2101, 2105, 2106
- Click OK until you get back to the Create Task window, switch to the Actions tab
- Click Browse and find the batch file you created in step 4, Click OK and then OK again on the Create Task window
6. Plug in your USB and wait for the cmd window to scan the USB.