Microsoft Defender for Cloud
Cloud and workloads

Test agentless malware scanning for VMs in Microsoft Defender for Cloud

In brief

The page now explains how to create and validate a test file on a Linux VM and adds PowerShell steps for creating a Windows test file that triggers an agentless malware scanning alert.

What Defender admins need to know

Administrators have clearer steps for verifying agentless malware scanning alerts on Linux and Windows VMs.

Summaries are generated from the documentation change itself.

Documentation change

The comparison below shows only the changed extract. Use the full-page view for complete context.

Test agentless malware scanning alerts

Create a test file for Linux

Use the following steps to create a test file on a Linux VM and trigger an agentless malware scanning alert.

  1. Open a terminal window on the VM.

  2. Run the following command:script to create and validate a test file that contains the antivirus test string:

    # test string
    

Create a test file for Windows with a text document

Use the following steps to create a Windows text file that triggers a test alert for agentless malware scanning.

  1. Create a text file on your VM.

  2. Paste the text $$89-barbados-dublin-damascus-notice-pulled-natural-31$$ into the text file. Ensure that there are no extra spaces or lines in the text file.

  3. Save the file.

  4. Open the file to validate that it contains the pasted test string.

  1. Save the file.

  2. Open the file to validate that it contains the content from stage 2.

The alert MDC_Test_File malware was detected (Agentless) will appear within 24 hours in the Defender for Cloud Alerts page and in the Defender XDR portal.

Create a test file for Windows with PowerShell

  1. Open PowerShell on your VM.

  2. Execute the following script.

The alert MDC_Test_File malware was detected (Agentless) will appear within 24 hours in the Defender for Cloud Alerts page and in the Defender XDR portal.

Create a test file for Windows with PowerShell

Use the following PowerShell steps to create a Windows test file and generate a malware scanning test alert.

  1. Open PowerShell on your VM.

  2. Execute the following script.