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 this cmdlet exports 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 this cmdlet exports 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 this cmdlet exports 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 this cmdlet exports 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 (http://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 that is 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

The first command gets the antimalware policy object that has the ID 16777568, and then stores it in the $AMPol01 variable.

The second command exports the policy in $AMPol01 to the file that is 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"

Related topics

Community Additions

ADD
Show: