Edit

Share via


Get-CMAntimalwarePolicy

Get an antimalware policy for endpoint protection.

Syntax

SearchByName (Default)

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

SearchByIdMandatory

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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ForceWildcardHandling

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Id

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:SettingsId

Parameter sets

SearchByIdMandatory
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specify the name of the antimalware policy to get.

You can use wildcard characters:

  • *: Multiple characters
  • ?: Single character

Parameter properties

Type:String
Default value:None
Supports wildcards:True
DontShow:False

Parameter sets

SearchByName
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-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.

Parameter properties

Type:

PolicyType[]

Default value:None
Accepted values:ScheduledScans, ScanSettings, DefaultActions, RealTimeProtection, ExclusionSettings, Advanced, ThreatOverrides, MicrosoftActiveProtectionService, DefinitionUpdates
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

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.