Get-CMAntimalwarePolicy

Get an antimalware policy for endpoint protection.

Syntax

Get-CMAntimalwarePolicy
   [-Name <String>]
   [-Policy <PolicyType[]>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMAntimalwarePolicy
   -Id <String>
   [-Policy <PolicyType[]>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMAntiMalwarePolicy cmdlet gets an antimalware policy for endpoint protection. This policy applies to a collection of client computers that are running the Configuration Manager agent. Antimalware policies are configuration settings that define how an antimalware agent operates on client computers.

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 antimalware policies

This command gets all antimalware policies for endpoint protection in Configuration Manager.

Get-CMAntiMalwarePolicy

Example 2: Get antimalware policies by using a wildcard character

This command gets antimalware policies that have a name that begins with the letter D.

Get-CMAntiMalwarePolicy -Name "D*"

Example 3: Get antimalware policies by using an object ID

This command gets the antimalware policy that has the ID 16777217.

Get-CMAntiMalwarePolicy -Id "16777217"

Parameters

-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

-Id

Specify the Settings ID of the antimalware policy object to get.

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

-Name

Specify the name of the antimalware policy to get.

You can use wildcard characters:

  • *: Multiple characters
  • ?: Single character
Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:True

-Policy

Filter the results based on the type of settings in the policy. For example, to only get policies that include settings for Cloud Protection Service, specify -Policy MicrosoftActiveProtectionService.

Type:PolicyType[]
Accepted values:ScheduledScans, ScanSettings, DefaultActions, RealTimeProtection, ExclusionSettings, Advanced, ThreatOverrides, MicrosoftActiveProtectionService, DefinitionUpdates
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

IResultObject[]

IResultObject

IResultObject

Dictionary<string, object>

Notes

For more information on this return object and its properties, see SMS_AntimalwareSettings server WMI class.