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.