Get-CMDetectedMalware

Gets detected malware.

Syntax

Get-CMDetectedMalware
   [-ThreatCategory <MalwareThreatCategory>]
   [-ThreatName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDetectedMalware
   -Collection <IResultObject>
   [-ThreatCategory <MalwareThreatCategory>]
   [-ThreatName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDetectedMalware
   -CollectionId <String>
   [-ThreatCategory <MalwareThreatCategory>]
   [-ThreatName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDetectedMalware
   -CollectionName <String>
   [-ThreatCategory <MalwareThreatCategory>]
   [-ThreatName <String>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMDetectedMalware
   -ThreatId <String>
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMDetectedMalware cmdlet gets detected malware.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Get all detected malware

PS ABC:\> Get-CMDetectedMalware

This command gets all detected malware.

Example 2: Get all detected malware for a collection

PS ABC:\> Get-CMDetectedMalware -CollectionName "testCollection"

This command gets all detected malware for the collection named testCollection.

Example 3: Get all detected malware by threat name

PS ABC:\> Get-CMDetectedMalware -ThreatName "Virus:DOS/EICAR_Test_File"

This command gets all detected malware named Virus:DOS/EICAR_Test_File.

Parameters

-Collection

Specifies a collection object. To obtain a collection object, use the Get-CMCollection cmdlet.

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

-CollectionId

Specifies the ID of a collection.

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

-CollectionName

Specifies the name of a collection.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-ThreatCategory

Specifies a malware threat category object. To obtain a malware threat category object, use the Get-CMMalwareThreatCategory cmdlet.

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

-ThreatId

Specifies the ID of a threat.

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

-ThreatName

Specifies the name of a threat.

Type:String
Aliases:Name
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.ConfigurationManagement.ManagementProvider.IResultObject

Outputs

IResultObject

IResultObject[]