Would you like to learn how to use Powershell to manually scan files and folders using Windows Defender? In this tutorial, we are going to show you how to start a custom Windows Defender scan using Powershell.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell - Scan files or folders using Windows Defender

As an Administrator, start an elevated Powershell command-line.

Windows 10 - powershell elevated

Use Powershell to scan a folder using Windows Defender.

Copy to Clipboard

In our example, we started the custom scan of a folder named TEST on the root of drive C.

Use Powershell to scan a file using Windows Defender.

Copy to Clipboard

In our example, we started the custom scan of a file using Windows Defender and Powershell.

Congratulations! You are able to scan files or folders using Windows Defender via Powershell command-line.