AzureTracks

Practical Azure and Microsoft 365 security walkthroughs

· · ·

Enable Agentless VM Scanning in Microsoft Defender for Cloud

Agent deployment is still useful for many security scenarios, but it can slow posture visibility when the environment contains unmanaged, newly built, or multicloud virtual machines. Agentless scanning helps close that gap by using platform-side discovery and analysis.

This walkthrough enables agentless VM scanning, validates that selected machines are covered, reviews generated findings, and explains how to use the results without treating agentless visibility as a full replacement for endpoint protection.

Figure 1. Small architecture diagram for the build path and finished state.

Goal: Enable agentless VM scanning in Defender for Cloud and validate vulnerability, malware, and exposure findings without deploying an agent to every VM.

Why build this

Agentless scanning is valuable when the security team needs visibility before an agent rollout is complete or when VMs span Azure and other clouds through Defender for Cloud. It provides posture insight without changing the guest operating system.

The pilot should confirm coverage, latency, and expected finding types. Then the team can decide where agent-based controls are still required for runtime detection or response.

Security outcome

  • Virtual machine posture findings appear even when no new guest agent is deployed for the pilot.
  • Security owners can separate visibility gaps from actual vulnerability or malware findings.
  • The team understands where agentless scanning complements, but does not replace, runtime endpoint controls.

What you will deploy or configure

  • Agentless scanning prerequisites reviewed.
  • A pilot subscription or resource group enabled.
  • Findings reviewed without deploying a VM extension to every host.
  • A remediation path for critical VM findings.
Microsoft baseline: Use agentless scanning to improve coverage, but do not use it as a blanket replacement for endpoint protection, logging, or workload-specific agents where those controls are required.
Special Highlight: Use agentless coverage as a gap-finding control. It is especially useful for machines where agents are missing, broken, or not yet deployed.

Prerequisites

  • Defender plan that includes agentless machine scanning.
  • Permissions to enable plan settings.
  • Representative Azure VMs and, if applicable, multicloud machines connected through Defender for Cloud connectors.

Before-state checklist

If you’ve been following along the last few articles, you likely noticed that we take a before state nearly every lab build that we do!

Capture the before state first. This includes stronger screenshots, helps admins understand what changed, and gives a clean rollback reference.

  • Record the current plan, policy, connector, rule, identity, or workspace setting before making changes.
  • Capture current access behavior or alert visibility so the final validation has a clear before/after comparison.
  • Confirm the owner for the resource and the person who can approve rollback if the pilot exposes a dependency.
  • Check whether existing logs, alerts, or recommendations already exist so the article does not confuse old data with new validation evidence.

Lab build

Start with a small VM group that includes at least one Windows machine and one Linux machine if available. Confirm that the Defender plan and permissions allow scanning, then review coverage and findings after the initial scan window. The goal of the lab is to prove visibility, timing, and remediation evidence on a controlled server set before expanding the control to production groups. Our goal is to enhance XDR or other agent-based malware detections, not replace it.

Overall lab build

Use this lab as a controlled validation workflow. The pilot should answer four questions: are the right plans enabled, are the right machines in scope, do findings appear after the assessment window, and can the team remediate one high-value issue and prove the recommendation state changed after reassessment?

Step 1 – Select the pilot VM group

Start with a small VM group that includes at least one Windows machine and one Linux machine if available. The group should be small enough to validate manually but realistic enough to show how agentless scanning behaves across operating systems and workload types.

  • Choose running VMs, not stopped lab leftovers. Agentless scanning only scans machines that are running during the scan window, so powered-off systems can create misleading coverage gaps.
  • Include one machine with higher operational importance or internet exposure if available, but avoid starting with a mission-critical production server unless the application owner is present for validation.
  • Select Dev or NonProd flavoured endpoints when possible for Pilot testing. This helps create the space to learn and explore as you go!

Step 2 – Review Defender plan settings

Open Defender for Cloud environment settings and review the relevant plan settings for Defender CSPM or Defender for Servers Plan 2. Confirm that the subscription containing the pilot machines is the same subscription where the plan is enabled.

  • In the plan settings, verify that agentless scanning for machines is turned on under Settings and monitoring. If both Defender CSPM and Defender for Servers Plan 2 are in use, document which plan is driving the pilot.
  • Confirm the operator has permissions to view environment settings, recommendations, machine resources, and any Key Vaults used for customer-managed disk encryption.

Step 3 – Enable agentless scanning in the pilot subscription

Enable agentless scanning in the pilot subscription and confirm the scope includes the target machines. Keep the first rollout narrow so any coverage or dependency issue is easy to diagnose.

  • After selecting Save, reopen the same plan settings and confirm the toggle remains enabled. Do not rely only on the save confirmation banner.
  • Check for scope blockers before waiting for results: unsupported disk types, total disk size over the documented limits, stopped VMs, or CMK encrypted disks without the required Key Vault permissions.

Step 4 – Plan the first assessment cycle

Wait for the first assessment cycle. Agentless collection is not instant, so plan a validation window rather than expecting findings immediately after enablement.

  • Capture an immediate “enabled” screenshot and schedule a second evidence capture after the first scan window. Microsoft documents the schedule as nonconfigurable and once every 24 hours.
  • Keep the pilot VMs running during the expected scan window. If a VM is deallocated during the scan, document it as an environment condition rather than a product failure.

Step 5 – Review vulnerabilities, secrets, and configuration risks

Review Defender for Cloud recommendations for vulnerabilities, secrets, and configuration risks surfaced from machine scanning. Filter the recommendation view to the pilot machines so the article does not mix old environment-wide findings with new lab evidence.

  • Review each finding for severity, affected resource, evidence, and remediation guidance. Record whether the finding came from vulnerability assessment, secret discovery, malware scanning, or configuration posture.
  • Separate “no finding” from “not assessed.” If a pilot VM has no findings, confirm the machine is in scope and recently assessed before using it as proof of clean posture.

Step 6 – Prioritize by exposure and business context

Prioritize internet-facing and business-critical machines first. Combine recommendation severity with exposure, data sensitivity, ownership, and identity context instead of sorting by severity alone.

  • Start with machines that have public IPs, permissive NSG rules, load balancer exposure, or application gateway exposure, because exploitable posture on externally reachable systems usually carries higher operational risk.
  • Use tags or an inventory worksheet to identify application owner, environment, data classification, and criticality. A medium finding on a critical exposed server may be a better first remediation than a high finding on an isolated test VM.

Step 7 – Remediate one high-value finding

Remediate one high-value finding and confirm that the recommendation state changes after reassessment. Pick a finding that can be safely changed during the lab, such as patching a vulnerable package, removing a non-production secret, correcting public exposure, or fixing a misconfiguration.

  • Record the exact remediation action, change ticket, owner, expected evidence, and rollback step before making the change. If the remediation requires a restart, schedule it like any other infrastructure change.
  • After the next assessment cycle, return to the same recommendation and confirm whether the affected-resource count decreased, the resource disappeared from the recommendation, or the risk state changed.

Step 8 – Compare agentless findings with endpoint or vulnerability tooling

Compare agentless findings with endpoint or vulnerability management tooling to identify coverage gaps. Agentless scanning is useful because it does not require a guest agent, but it should complement—not automatically replace—existing endpoint security and vulnerability management processes.

  • For one Windows and one Linux pilot machine, compare software inventory, vulnerability findings, secret exposure, malware findings if applicable, and last assessment time across the tools.
  • Document gaps as operating model decisions. Examples include endpoint-only runtime detections, agentless-only visibility on unmanaged machines, or discrepancies caused by scan timing.

Change-window notes

  • Schedule the pilot so a resource owner can validate application behavior after remediation, not just after enablement. Agentless scanning itself does not require a guest agent and should not affect VM performance, but remediation actions can affect workloads.
  • Keep the first production expansion intentionally narrow. A small Windows/Linux group with complete evidence is better than a subscription-wide expansion with uncertain ownership.
  • Do not rely on same-minute validation. Build the change ticket around the documented assessment cycle and include a next-day evidence capture task.
  • For CMK (customer managed key aka your own) encrypted disks, pre-check Key Vault permissions before the change window. Missing permissions can create a false impression that the feature is broken.
  • For remediation that affects traffic flow, authentication, endpoint protection, secrets, or operating system packages, pre-stage the rollback steps in the change ticket.
  • Do not retire endpoint agents or vulnerability tools because agentless findings appeared. Use this lab to define how agentless scanning complements the existing endpoint and vulnerability management process.

Find Recommendations for Prioritization

Use the following block as a starting point for validation or implementation. Replace names, scopes, and resource identifiers before using it in production.

//Defender for Cloud recommendation triage pattern
SecurityRecommendation
| where TimeGenerated > ago(14d)
| where RecommendationSeverity in ("High", "Medium")
| project TimeGenerated, RecommendationName, RecommendationSeverity, AssessedResourceId
| order by TimeGenerated desc

Production hardening

For production, pair agentless scanning with normal VM ownership and patch governance. Findings need routing, prioritization, and remediation timelines just like agent-based vulnerability results.

  • Treat this control as part of the normal security operations backlog, not as a one-time portal configuration. Assign a named owner and review cadence before wider rollout.
  • Use tags or a documented inventory to identify owner, environment, data sensitivity, and business criticality before expanding beyond the pilot.
  • Separate deployment permission from approval permission. Security controls are stronger when one identity cannot both weaken and approve the control.
  • Send logs, alerts, or audit evidence to the existing SOC workflow instead of creating a new place that nobody checks.
  • Create an exception process with owner, expiry date, business justification, and compensating controls.
  • Add the configuration to your normal change-management and monthly control-review process.

Operational handoff

  • Add the new control to the monthly security review or platform operations checklist.
  • Record the expected alert owner, escalation path, and response time for findings created by the control.
  • Store the validation query, screenshot checklist, and rollback notes with the service runbook.
  • Review exceptions quarterly and remove any exception that no longer has a business owner or expiry date.

Finished-state validation

Figure 2. Finished-state validation chart for the completed build.

ControlExpected resultEvidence to capture
PlanAgentless scanning is enabled for pilot scopePlan settings
CoveragePilot machines appear in Defender inventoryDefender inventory
FindingsVulnerability/security recommendations appearRecommendations
RemediationOne finding is fixed and reassessedRecommendation state
GapsMachines without endpoint agent are identifiedInventory comparison
ExpansionRollout scope is documentedDeployment notes

Cost and licensing notes

Agentless capabilities are tied to Defender plan licensing. The operational value is faster posture visibility across machines that may not have working agents.

Known limitations and edge cases

  • Agentless scanning is not endpoint detection and response.
  • Assessment timing can delay validation.
  • Encrypted disks, permissions, and connector configuration can affect coverage depending on environment.

Troubleshooting

  • If the control does not appear enabled, re-check RBAC at the subscription and resource scope before changing the configuration again.
  • If logs or recommendations do not appear immediately, confirm documented data latency before assuming the deployment failed.
  • If a production dependency breaks, stop expansion, capture the failing path, and compare it against the before-state inventory.
  • If an alert is noisy, tune scope and ownership first. Do not suppress security signals globally without a review record.

Rollback or cleanup

  • For lab resources, remove the pilot association, policy assignment, connector, rule, or configuration after screenshots and validation are complete.
  • For production resources, rollback should be a controlled change that restores the last known-good configuration and preserves audit evidence.
  • For irreversible settings, such as locked backup immutability, rollback is not available. Treat the approval step as the control point.

Thanks for joining me for this longer walkthrough & I hope this helps you move forward with your pilot for Agentless Scanning with Microsoft Defender for Cloud. There are excellent prime-time and supporting features in MDC that can accelerate your programs to reduce risk exposures.

About AzureTracks

AzureTracks publishes practical Azure and Microsoft 365 security guidance with deployment, validation, operational, and rollback considerations.

Learn more about Andrew and the site’s technical approach →