Skip to main content
Version: 2.0.1 (preview)

Get-MdeDeviceCount

SYNOPSISโ€‹

Counts how many devices are protected by Microsoft Defender for Endpoint

SYNTAXโ€‹

Count (Default)โ€‹

Get-MdeDeviceCount [-ProgressAction <ActionPreference>] [<CommonParameters>]

Detailsโ€‹

Get-MdeDeviceCount [-IncludeDetails] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTIONโ€‹

Returns the number of Windows devices that can receive MDE antivirus policies. Only includes devices managed by Defender ('msSense') or Intune ('mdm').

EXAMPLESโ€‹

EXAMPLE 1โ€‹

Get-MdeDeviceCount

Returns the number of MDE-protected devices.

EXAMPLE 2โ€‹

Get-MdeDeviceCount -IncludeDetails

Returns a hashtable with Count, Devices, and TotalManagedDevices.

PARAMETERSโ€‹

-IncludeDetailsโ€‹

Returns detailed device information instead of just the count

Type: SwitchParameter
Parameter Sets: Details
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ProgressActionโ€‹

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParametersโ€‹

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTSโ€‹

OUTPUTSโ€‹

System.Int32โ€‹

System.Collections.Hashtableโ€‹

NOTESโ€‹