Remove-CMAntimalwarePolicy

SYNOPSIS

Removes an antimalware policy for Endpoint Protection.

SYNTAX

SearchByIdMandatory (Default)

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

SearchByNameMandatory

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

SearchByValueMandatory

Remove-CMAntimalwarePolicy -InputObject <IResultObject> [-Force] [-DisableWildcardHandling]
 [-ForceWildcardHandling] [-WhatIf] [-Confirm] [<CommonParameters>]

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.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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
Parameter Sets: (All)
Aliases: 

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

-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

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

-Id

Specifies the ID of an antimalware policy object.

Type: String
Parameter Sets: SearchByIdMandatory
Aliases: SettingsId

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

-InputObject

Specifies a CMAntiMalwarePolicy object.

Type: IResultObject
Parameter Sets: SearchByValueMandatory
Aliases: 

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
Parameter Sets: SearchByNameMandatory
Aliases: 

Required: True
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
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
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 (http://go.microsoft.com/fwlink/?LinkID=113216).

INPUTS

OUTPUTS

NOTES

Export-CMAntimalwarePolicy

Get-CMAntiMalwarePolicy

Import-CMAntimalwarePolicy

Merge-CMAntimalwarePolicy

New-CMAntimalwarePolicy

Set-CMAntiMalwarePolicy