Export-CMAntimalwarePolicy

Export-CMAntimalwarePolicy

Exports an antimalware policy for Endpoint Protection.

Syntax

Parameter Set: ExportByNameMandatory
Export-CMAntimalwarePolicy -ExportFilePath <String> -Name <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ExportByIdMandatory
Export-CMAntimalwarePolicy -ExportFilePath <String> -Id <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: ExportByValueMandatory
Export-CMAntimalwarePolicy -ExportFilePath <String> -InputObject <IResultObject> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Export-CMAntiMalwarePolicy cmdlet exports an antimalware policy for System Center 2012 Endpoint Protection. Policies include information about the scan schedule, the types of files and folders to scan, and the actions to take when a scan detects malware.

Parameters

-ExportFilePath<String>

Specifies a full file path to which you export the policy.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String>

Specifies the policy that you export by using an ID.

Aliases

SettingsId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies the policy that you export by using an antimalware policy object. To obtain an antimalware policy object, use the Get-CMAntiMalwarePolicy cmdlet.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the policy that you export by using a name.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Export an antimalware policy by using an ID

This command exports an antimalware policy that has the ID "16777568" to the file named "AMPollicy05.xml" in the folder named "C:\Exports\Policy".

PS C:\> Export-CMAntiMalwarePolicy -Id "16777568" -Path "C:\Exports\Policy\AMPolicy05.xml"

Example 2: Export an antimalware policy by using a variable

This example exports an antimalware policy.

The first command gets the antimalware policy object that has the ID "16777568" and assigns it to the variable named $AMPol01.

The second command exports the policy in the in the $AMPol01 variable to the file named "AMPolicy05.xml" in the folder named "C:\Exports\Policy".

PS C:\> $AMPol01 = Get-CMAntiMalwarePolicy -ID "16777217"PS C:\>Export-CMAntiMalwarePolicy -InputObject $AMPol01 -Path "C:\Exports\Policy\AMPolicy05.xml"

Get-CMAntiMalwarePolicy

Merge-CMAntimalwarePolicy

New-CMAntimalwarePolicy

Remove-CMAntiMalwarePolicy

Set-CMAntiMalwarePolicy