Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How to manage Microsoft Defender Antivirus using Group Policy and Command Line Utility

Posted on 18/05/202216/08/2026 Imoh Etuk By Imoh Etuk No Comments on How to manage Microsoft Defender Antivirus using Group Policy and Command Line Utility
  1. Home
  2. Anti-Virus Solution
  3. How to manage Microsoft Defender Antivirus using Group Policy and Command Line Utility
Slide1-1

In this article, we shall discuss how to manage Microsoft Defender Antivirus using Group Policy and CMD (Commandline). Microsoft Defender Antivirus (previously Windows Defender Antivirus) is a component of the Windows Security experience, and it offers real-time protection against viruses, ransomware, spyware, rootkits, and a variety of other malware and hackers. Please see How to remove Microsoft Defender update on Windows 10 and Windows Server image.

It’s also one of the top antivirus software recommendations. Although the Windows Security app makes daily antivirus tasks simple, you can also operate the anti-malware solution via PowerShell commands, which can be useful in a variety of situations.

When you want to change a feature that isn’t available through the graphical user interface (GUI), such as scheduling a quick or full scan or a signature update, for example. To automate some Microsoft Defender Antivirus functions, you’ll need to write scripts.

Alternatively, utilizing commands rather than a GUI might speed up the configuration process, especially if you need to apply the same settings to many Windows PCs at the same time.

In this post, you will learn how to manage Microsoft Defender Antivirus in your business with Group Policy and Microsoft Malware Protection Command Line Utility (mpcmdrun.exe).

Here are some related guides: How to update Microsoft Defender Antivirus into the install image of Windows,  and how to schedule Windows Defender Antivirus to scan on-demand in Windows.

What is Group Policy?

Group Policy is a Windows feature that allows network administrators to regulate the working environment of users and computer accounts in Active Directory through a number of complex settings.

It essentially gives administrators a consolidated location to manage and modify operating systems, programs, and user preferences. Group Policy is essentially a security tool that enables applying security settings to users and computers.

Also, see Windows Defender Antivirus Management with Intune, and Install.wim: How to view Microsoft Defender Antivirus update details on Windows 10 image.

What is the MpCmdRun.exe command?

mpcmdrun.exe is an important part of Microsoft’s Windows Security system that helps protect your PC from online threats and malware. You can also use this utility if you’d like to automate Microsoft Security Antivirus. You must run the .exe from the Windows command prompt.

Learn more about Microsoft Defender and Windows 11 encryption features in these related posts how to remove Microsoft Defender update on Windows 10 and Windows Server image, how to view Microsoft Defender Antivirus update details on Windows 10 image (install.wim), and new Windows 11 encryption features and security enhancements will help protect hybrid work.

Managing Microsoft Defender Antivirus using Group Policy

You can configure and manage Microsoft Defender Antivirus on your endpoints using Group Policy. In practice, you can configure or alter Microsoft Defender Antivirus group policy settings by following the steps below:

From the Start Menu, search for and click on "Edit Group Policy". Alternatively, press the Windows key + R to open the Run dialog box and type "gpedit.msc" to open the Group Policy Management Console.

On local Windows 10 /11 that’s not a Windows Server, you find it as the “Local Group Policy Editor”. It is named Local Group Policy Editor because your Windows 10 or 11 PC is a Server.

Windows Defender Antivirus
Open the Run command

On the Group Policy Management Console or Local Group Policy, click on  Computer Configuration->Administrative Templates.

Windows Malware Protection
Editing the Local Group Policy

Expand the tree to Windows components > Microsoft Defender Antivirus.

Windows-Config-Microsoft-Defender-Antivirus
Open Windows Config->Microsoft Defender Antivirus

Select the area containing the setting you wish to alter, then double-click the setting to open it and make changes.

Windows Security Antivirus
Configure Settings

Enable an option under the “Client Interface”

Here, we are going to enable an option under the “Client Interface,” introducing the ability to display additional text to clients when they need to act. Additionally, the option allows you to suppress all notifications, suppress reboot notifications, and enable headless UI mode.”

Windows Malware Protection
Client Interface

The display of additional text to clients when they need to perform an action policy if enabled as stated in the flyout dialog box of the policy will allow you to configure whether or not to display additional text to clients when they need to act. The text displayed is a custom administrator-defined string.

For example, the phone number to call the company help desk. The client interface will only display a maximum of 1024 characters. Longer strings will be truncated before display.

To enable the display of additional text to clients when they need to perform an action policy, you can follow these steps:

Double-click on it to open, and click on "Enabled" type the text you will like to display to clients in the options column. Click Apply and Okay.

Display-text-to-clients
Text to display to clients

This policy supports at least Windows Server 2012, Windows 8 or Windows RT down to Windows 10 and 11.

After that, the status for display additional text to clients when they need to perform an action will become enabled.

State-is-Enabled
Status is Enabled

Managing Microsoft Defender Antivirus using Microsoft Malware Protection Command Line Utility (MpCmdRun.exe)

The Microsoft Malware Protection Command Line Utility is “MpCmdRun.exe.” It allows command-line, parameter-controlled execution of the computer’s native Microsoft antimalware program with administrator credentials (Windows Defender, Microsoft Security Client, or Microsoft Security Essentials)

You can use the specific command-line utility mpcmdrun.exe to perform numerous functions in Microsoft Defender Antivirus. When you wish to automate Microsoft Defender Antivirus tasks, this utility comes in handy. The program can be found in the folder %ProgramFiles%\Windows Defender\MpCmdRun.exe. Use a command prompt to run it.

To run the command, launch the command prompt as an administrator and then enter MpCmdRun.exe command and press enter. You can run directly from the C:\Program Files\Windows Defender directory.

Launch-the-cmd-from-the-location
Run the MpCmd command from the Location

If you’re running an updated Microsoft Defender Antivirus platform version, run MpCmdRun from the following location: C:\ProgramData\Microsoft\Windows Defender\Platform\<antimalware platform version>.

Run-from-platform
Run the MpCmdRun from the Platform

The MpCmdRun utility uses the following syntax:

MpCmdRun.exe [command] [-options]

For example, we use ScanType 1 to carry out a quick scan as shown below.

MpCmdRun.exe -Scan -ScanType 1
Scan-started
Starting ScanType 1
Scans for malicious software. Values for ScanType are:
0 Default, according to your configuration. 1 Quick scan, 2 Full scan, 3 File and directory custom scan.

The scan is now completed

Scan-finished
Scan Completed

You will also be notified via the notification area of your PC window

Scan-completed-Notifications
Scan Completed Desktop Notifications

When clicked on the notifications, you will be directed to some recommended action to take to further strengthen the security of the PC.

Recommendations
Security Recommendations

As shown above, the SmartScreen for Microsoft Edge is turned off on my PC and I’m giving the action to take which is to turn it on.

I hope you found this blog post on how to manage Microsoft Defender Antivirus using Group Policy and CMD (Commandline) helpful. If you have any questions, please let me know in the comment section.

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
Anti-Virus Solution, Windows, Windows Server Tags:Microsoft Defender Antivirus, Microsoft Windows, Windows 11, Windows Server 2016

Post navigation

Previous Post: Fix the request to add or remove features on the specified server failed
Next Post: How to fix The Group Policy settings for BitLocker startup options are in conflict and cannot be applied

Related Posts

  • Interactive logon Message for Users
    Display interactive logon messages for Windows PCs via GPO Windows
  • Rules of Delegation
    Assign users with rights to reset password in Active Directory Windows Server
  • wifi
    Reveal Windows WiFi password of Network you are connected to Windows
  • Clear Saved Email Address in Microsoft Edge
    Clear Saved Email Address: Stop Microsoft Edge from remembering your email ID Windows
  • BitLocker Protection off Update UEFI BIOS to fix issues
    BitLocker Protection off: Update UEFI/BIOS to fix issues Windows
  • SSH Keys Generation
    How to Generate SSH keys in Windows 11 Windows

More Related Articles

Interactive logon Message for Users Display interactive logon messages for Windows PCs via GPO Windows
Rules of Delegation Assign users with rights to reset password in Active Directory Windows Server
wifi Reveal Windows WiFi password of Network you are connected to Windows
Clear Saved Email Address in Microsoft Edge Clear Saved Email Address: Stop Microsoft Edge from remembering your email ID Windows
BitLocker Protection off Update UEFI BIOS to fix issues BitLocker Protection off: Update UEFI/BIOS to fix issues Windows
SSH Keys Generation How to Generate SSH keys in Windows 11 Windows

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

veeaam100

Veeam Vanguard

  • Featured image 3
    How to fix White Screen in Microsoft Teams Windows
  • settings app not working featured 800x400 1
    How to save and stop modification to Microsoft Management Console Windows
  • Jenkins
    How to Install Jenkins Automation Server on Ubuntu 20.04 LTS Linux
  • maxresdefault 2 3
    How to configure WatchGuard WebCenter Network | Monitoring
  • plain blue background
    Request a certificate signing request in Windows using Microsoft Management Console Windows Server
  • maxresdefault
    The following errors occurred attempting to join the domain: The specified domain either does not exist or could not be contacted Windows Server
  • M365 password reset
    How to reset Microsoft 365 User Password AWS/Azure/OpenShift
  • Review of Stellar Repair for Outlook
    A Review of Stellar Repair for Outlook Reviews

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,752 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Contact
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon
  • Bsky

Tags

Active Directory Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.