
You can use the following PowerShell command to check the service state of Windows Defender: Get-service Windefend Get-Help cmdlet name -Examples How to Check if Windows Defender is Running?īefore using PowerShell cmdlets to control Windows Defender, it is advisable to check that the service is running. If you need only examples of PowerShell commands, run: To get full help on a specific cmdlet of the Defender module, use the command: Get-Help cmdlet name –Full
Start-MpWDOScan-runs a Windows Defender offline scan. Update-MpSignature-anti-virus definition database update. Set-MpPreference-used to change scan and update options. Remove-MpThreat-allows you to remove active threats from your computer. Remove-MpPreference-allows you to remove Windows Defender settings or exceptions.
Get-MpThreatDetection-displays a list of active and recent threats detected on the computer. Get-MpThreatCatalog-allows you to get known threats from the definitions directory. Get-MpThreat-view the history of detected threats on your computer. Get-MpPreference-used to get Windows Defender scan and update options. Get-MpComputerStatus-allows you to get the status of anti-virus software on your computer. Add-MpPreference-used to change Windows Defender settings. To display a list of cmdlets contained in the Defender module, run the following command: Get-Command -Module Defender This module contains 11 cmdlets, which we are reviewing today. It appeared first time in PowerShell 4.0 and was designed specifically for Windows Defender management. A large number of settings available from the PowerShell console, through a built-in module Defender. In most cases, Windows Defender works well with the default settings, but sometimes the user needs to change its behavior. Although, in the latest Windows Server 2016/2019, Windows Defender can be installed as an additional server feature using the command: Install-WindowsFeature-Name Windows-Server-Antimalware At the moment, Windows Defender is a part of the only desktop Windows OS and not available in the current versions of Windows Server.