Remove-CMAntimalwarePolicy

Removes an antimalware policy for Endpoint Protection.

Syntax

Remove-CMAntimalwarePolicy
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      -Id <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMAntimalwarePolicy [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -InputObject  [-WhatIf] []
Remove-CMAntimalwarePolicy [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -Name  [-WhatIf] []

Description

The Remove-CMAntiMalwarePolicy cmdlet removes an antimalware policy for System Center 2016 Endpoint Protection from Microsoft System Center Configuration Manager.

When you create an antimalware policy for Endpoint Protection and deploy it to a collection of client computers, this antimalware policy overrides the default antimalware policy. When you remove an antimalware policy for Endpoint Protection, System Center Configuration Manager removes the antimalware agent from the client computers and applies the policy with the next highest priority. If no other policies exist, then the default antimalware policy is applied.

Examples

Example 1: Remove an antimalware policy by using ID

PS C:\> Remove-CMAntiMalwarePolicy -Id "16777217"

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

Example 2: Remove an antimalware policy by using a wildcard character

PS C:\> Remove-CMAntiMalwarePolicy -Name "D*"

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

Example 3: Remove an antimalware policy by using object variable

PS C:\> $AMPobj = Get-CMAntiMalwarePolicy -Id "16777217"
PS C:\> Remove-CMAntiMalwarePolicy -InputObject $AMPobj

The first command gets an antimalware policy object that has the ID 16777217 and stores it in the $AMPobj variable.

The second command removes the antimalware policy stored in the $AMPobj variable.

Required Parameters

-Id

Specifies the ID of an antimalware policy object.

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

Specifies a CMAntiMalwarePolicy object.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies the name of an antimalware policy.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Forces the command to run without asking for user confirmation.

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

Indicates that wildcard handling is enabled.

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

Shows what would happen if the cmdlet runs. The cmdlet is not run.

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