< Back
Set-CIPolicyVersion
Post
NAME Set-CIPolicyVersion
SYNOPSIS
Updates the version number of the policy.
SYNTAX
Set-CIPolicyVersion -FilePath <String> -Version <String> [<CommonParameters>]
DESCRIPTION
The Set-CIPolicyVersion cmdlet updates the version number of the policy for a signed policy scenario. When you update a signed policy, the policy
must be replaced by a policy that has a signer specified in the UpdatePolicySigners property of the policy. The policy must also be an equal or
greater version that the previous policy.
PARAMETERS
-FilePath <String>
Specifies the path of a policy .xml file that this cmdlet udpates.
Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Version <String>
Specifies the version string with which this cmdlet replaces the current version of the policy. Specify the version in the following format:
integer.integer.integer.integer. The New-CIPolicy and Merge-CIPolicy cmdlets create policies with the default version of 10.0.0.0.
Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Example 1: Update the version number of a policy
PS C:\\>Set-CIPolicyVersion -FilePath '.\\Policy.xml' -Version '11.1.0.2'
PS C:\\> Get-Content -Path '.Policy.xml'
<?xml version="1.0" encoding="utf-8"?>
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy">
<VersionEx>11.1.0.2</VersionEx>
<PolicyTypeID>{A244370E-44C9-4C06-B551-F6016E563076}</PolicyTypeID>
The first command modifies the version of Policy.xml to be 11.1.0.2.
The second command displays the contents of the policy. This example shows the first few lines of the policy, which include the VersionEx
property. It now has a value of 11.1.0.2.
RELATED LINKS
Merge-CIPolicy
New-CIPolicyRule
SYNOPSIS
Updates the version number of the policy.
SYNTAX
Set-CIPolicyVersion -FilePath <String> -Version <String> [<CommonParameters>]
DESCRIPTION
The Set-CIPolicyVersion cmdlet updates the version number of the policy for a signed policy scenario. When you update a signed policy, the policy
must be replaced by a policy that has a signer specified in the UpdatePolicySigners property of the policy. The policy must also be an equal or
greater version that the previous policy.
PARAMETERS
-FilePath <String>
Specifies the path of a policy .xml file that this cmdlet udpates.
Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Version <String>
Specifies the version string with which this cmdlet replaces the current version of the policy. Specify the version in the following format:
integer.integer.integer.integer. The New-CIPolicy and Merge-CIPolicy cmdlets create policies with the default version of 10.0.0.0.
Required? true
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Example 1: Update the version number of a policy
PS C:\\>Set-CIPolicyVersion -FilePath '.\\Policy.xml' -Version '11.1.0.2'
PS C:\\> Get-Content -Path '.Policy.xml'
<?xml version="1.0" encoding="utf-8"?>
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy">
<VersionEx>11.1.0.2</VersionEx>
<PolicyTypeID>{A244370E-44C9-4C06-B551-F6016E563076}</PolicyTypeID>
The first command modifies the version of Policy.xml to be 11.1.0.2.
The second command displays the contents of the policy. This example shows the first few lines of the policy, which include the VersionEx
property. It now has a value of 11.1.0.2.
RELATED LINKS
Merge-CIPolicy
New-CIPolicyRule