DefenderReporter

Docs

How to Check Microsoft Defender Status on Multiple Computers

Check Microsoft Defender status on multiple computers with a read-only PowerShell remoting script, CSV output, failure handling, and practical interpretation.

Category: Quick Answers | Published 2026-03-11 | Updated 2026-11-26

Question for Operators reviewing Defender coverage across many endpoints

Use an approved PowerShell remoting connection to query Defender status on several Windows computers and export a CSV. This guide includes prerequisites, a script that preserves failed queries, example results, and a separate DefenderReporter workflow for ongoing review.

Short Answer

To check Microsoft Defender status on multiple computers, run Get-MpComputerStatus through an already approved PowerShell remoting connection, or collect endpoint status into a central reporting system. Record failures and collection time along with protection flags. A computer that cannot be queried has an unknown current state, not a healthy or disabled result.

The native example below creates a CSV snapshot without installing DefenderReporter or changing Defender settings. The product workflow appears after the collection and interpretation steps.

Before You Run a Remote Check

  • Use Windows endpoints where the Defender PowerShell module is available.
  • Run Windows PowerShell under an account authorized to query each target; use an elevated session where required by your environment.
  • PowerShell remoting/WinRM, authentication, name resolution, and firewall access must already be configured through your normal management policy.
  • Use an approved management network or VPN. This example does not enable remoting or broaden TrustedHosts.
  • Put one approved computer name per line in computers.txt in your working directory.

Microsoft documents the remoting requirements and Invoke-Command behavior. Resolve access requirements with the administrator of the targets before running the query.

Example computers.txt:

DESKTOP-01
LAPTOP-07
SERVER-02

Collect Defender Status and Export a CSV

The following script queries one computer at a time. It keeps a row for failed queries and converts remote timestamps to UTC before returning them. AMRunningMode is included for local interpretation; it is not a field currently collected by the DefenderReporter agent.

$computers = Get-Content -LiteralPath .\computers.txt |
    ForEach-Object { $_.Trim() } |
    Where-Object { $_ } |
    Select-Object -Unique

$rows = foreach ($computer in $computers) {
    try {
        Invoke-Command -ComputerName $computer -ErrorAction Stop -ScriptBlock {
            function Get-UtcTimestamp($value) {
                if ($value -and ([datetime]$value).Year -gt 1900) {
                    ([datetime]$value).ToUniversalTime().ToString('o')
                }
            }
            $status = Get-MpComputerStatus -ErrorAction Stop
            [pscustomobject]@{
                CollectedAtUtc = (Get-Date).ToUniversalTime().ToString('o')
                QueryStatus = 'OK'
                AMRunningMode = $status.AMRunningMode
                AntivirusEnabled = $status.AntivirusEnabled
                RealTimeProtectionEnabled = $status.RealTimeProtectionEnabled
                SignatureUpdatedUtc = Get-UtcTimestamp $status.AntivirusSignatureLastUpdated
                QuickScanEndUtc = Get-UtcTimestamp $status.QuickScanEndTime
                FullScanEndUtc = Get-UtcTimestamp $status.FullScanEndTime
                QueryError = ''
            }
        } | Select-Object @{Name='ComputerName'; Expression={ $computer }}, *
    }
    catch {
        [pscustomobject]@{
            ComputerName = $computer
            CollectedAtUtc = (Get-Date).ToUniversalTime().ToString('o')
            QueryStatus = 'Query failed'
            QueryError = $_.Exception.Message
        }
    }
}

$columns = 'ComputerName', 'CollectedAtUtc', 'QueryStatus', 'AMRunningMode',
    'AntivirusEnabled', 'RealTimeProtectionEnabled', 'SignatureUpdatedUtc',
    'QuickScanEndUtc', 'FullScanEndUtc', 'QueryError'

$rows | Select-Object $columns |
    Export-Csv -LiteralPath .\defender-status.csv -NoTypeInformation -Encoding UTF8
$rows | Select-Object $columns | Format-Table -AutoSize

Missing scan dates remain blank. All result rows have the same CSV columns, including when the first target fails. Collection times are the targets' timestamps on successful queries and the management computer's attempt time on failure; keep system clocks synchronized when comparing them. The sequential example favors readable error handling over large-scale collection speed.

What Status Should Mean Across Many Devices

Interpret the CSV as a dated snapshot. These are illustrative results, not a live scan:

Computer Query Antivirus Real-time protection Interpretation
DESKTOP-01 OK True True Inspect signature and scan timestamps against your policy
LAPTOP-07 OK True False Validate operating mode and the reason protection is disabled
SERVER-02 Query failed blank blank Current state is unknown; investigate the reported connection or access error

A successful query is not the same as healthy protection. Conversely, a connection failure does not establish that Defender is disabled. Compare results with an expected device inventory so computers absent from the input list are not silently counted as covered.

Prioritize the Right Exceptions

Review successful queries with disabled protection first, then signatures outside your chosen update policy and missing scan evidence. Separately work through failed queries and unqueried endpoints. Keep the raw error message so a name-resolution, authentication, or Defender-module problem can be investigated appropriately.

Use the protection-state guide, passive-mode guide, and signature-update guide for the next diagnosis. A flag alone does not explain why the endpoint is in that state.

Validate a Sample of Outliers Locally

On an affected endpoint, compare a fresh local result with the captured row:

Get-MpComputerStatus | Select-Object AMRunningMode, AntivirusEnabled,
    RealTimeProtectionEnabled, AntivirusSignatureLastUpdated,
    QuickScanEndTime, FullScanEndTime

If local collection succeeds but remote collection failed, investigate the management connection. If the local command is unavailable or errors, verify the Defender module and operating state before inferring a protection result. The scan visibility guide explains how missing scan evidence affects review.

Separate Offline Devices from Protection Problems

For periodic reporting, compare protection flags with the collection or check-in time. A device last seen two days ago is not evidence of its present protection state, even when the older snapshot says True. Report those machines as requiring fresh evidence rather than merging them into the protected count.

Use the Devices View First

For an ongoing DefenderReporter review, open Devices and choose columns for Last Seen, Antivirus, Real-time Protection, Signature Updated, and scan end times. This is a separate workflow from the native CSV script: the configured agent reports over HTTPS, so the product does not depend on the WinRM connection used in that example.

In the sample Devices screen, DESKTOP-01 has an older signature timestamp, LAPTOP-07 reports real-time protection off, and SERVER-02 needs a fresh check-in. Select the image to inspect the fields at full size.

Open a device for the reported protection controls and scan timestamps:

Actual device posture panel showing sample protection flags and scan timestamps

Sample endpoint data. Missing values remain unknown. DefenderReporter collects selected status fields and detections; use local tools for operating-mode context such as AMRunningMode. Review the installation and data-collection details and the broader posture monitoring workflow when evaluating continuous collection.

Build a Repeatable Review Cadence

Record a reporting period and freshness window. Review newly disabled controls and failed collection attempts daily, then review recurring update and scan exceptions weekly. Use the reporting basics guide and worksheet to document a reviewer, next action, and verification date outside the status data.

When a Multi-Computer Review Page Is Not Enough

For an individual exception, check whether the endpoint is controlled by organization policy or using another antivirus provider. If the checks confirm that several PCs need the same setting changed, choose how to apply Defender Antivirus policy across those PCs. After rollout, collect a fresh snapshot or review the next agent reports.

Your next step

Responsible for several Windows PCs?

See which PCs reported real-time protection off, which have old signature timestamps, and which last checked in days ago. Open a device to see the evidence for your next check.

Devices screen showing a sample PC with real-time protection off and another with an old check-in
Actual Devices screen captured November 10, 2026, with sample data. Compare protection and signature age with each PC’s last check-in.

Free. No credit card. Start with one Windows PC.

Free account access. Verify your email, sign in, download your configured Windows installer, run it as Administrator, and confirm endpoint check-in.

Requires Windows, PowerShell, Task Scheduler, and HTTPS access. Review installation requirements.

FAQ

What is the fastest way to check Defender on multiple computers?

For a dated snapshot, run Get-MpComputerStatus through approved PowerShell remoting and export the results to CSV. For recurring reviews, use centralized status data and validate outliers locally.

Which fields matter most?

Start with collection time, query success or failure, Antivirus, Real-time Protection, signature update time, and scan timestamps.

Should I treat missing values as failures?

Not automatically. Missing fields can also mean stale or offline endpoints, so compare protection state with recent device activity.

Authoritative Source

Microsoft Learn: Use PowerShell cmdlets for Microsoft Defender Antivirus

Primary Microsoft reference for validating Defender status, signatures, and scan state locally with supported PowerShell cmdlets.

Related Docs

Browse all docs or see product features.