Set-CIPolicy IdInfo

Modifies the name and ID of a Code Integrity policy.

Syntax

Set-CIPolicyIdInfo
   [-FilePath] <String>
   [-PolicyName <String>]
   [-PolicyId <String>]
   [<CommonParameters>]

Description

The Set-CIPolicyIdInfo cmdlet modifies the policy name and policy ID of a Code Integrity policy. Specify the .xml file of the policy to modify. Event Tracing for Windows (ETW) events use the PolicyID and Name properties to identify which policy is currently running on a computer.

Examples

Example 1: Modify the ID and name of a policy

PS C:\> Set-CIPolicyIdInfo -FilePath ".\Policy03.xml" -PolicyId "CIP077" -PolicyName "CIPolicy03"

This command modifies the policy ID and the policy name for the policy stored in the Policy03.xml file.

Example 2: Modify the name of a policy

PS C:\> Set-CIPolicyIdInfo -FilePath ".\Policy03.xml" -PolicyName "CIPolicy77"

This command modifies only the policy name for the policy stored in the Policy03.xml file.

Required Parameters

-FilePath

Specifies the path of a Code Integrity policy .xml file.

Type: String
Aliases: f
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Optional Parameters

-PolicyId

Specifies the value for the PolicyID property. This string is not required to be a GUID.

Type: String
Aliases: pid
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-PolicyName

Specifies the value for the Name property.

Type: String
Aliases: pn
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False