Set-CIPolicyIdInfo
Modifies the name and ID of a Code Integrity policy.
Syntax
Set-CIPolicyIdInfo
[-FilePath] <String>
[-PolicyName <String>]
[-SupplementsBasePolicyID <Guid>]
[-BasePolicyToSupplementPath <String>]
[-ResetPolicyID]
[-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.
Example 3: Specify the base policy ID of a supplemental policy
PS C:\> Set-CIPolicyIdInfo -FilePath ".\Supplemental_Policy.xml" -BasePolicyToSupplementPath ".\Base_Policy.xml"
This command will extract the PolicyID field from the Base_Policy.xml file and modify the BasePolicyID field in the Supplemental_Policy.xml file.
Parameters
-BasePolicyToSupplementPath
Specifies the path to a base policy to get the value for the BasePolicyID property for a supplemental policy.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-FilePath
Specifies the path of a Code Integrity policy .xml file.
Type: | String |
Aliases: | f |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-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 |
Required: | False |
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 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResetPolicyID
Resets both the PolicyID and BasePolicyID values. This parameter will convert a single-policy format policy to multi-policy format.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SupplementsBasePolicyID
Specifies the value for the BasePolicyID property for a supplemental policy.
Type: | Guid |
Aliases: | None |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Related Links
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기