Update-VSTeamPolicy -ProjectName Demo -id 1 -type 687c53f8-1a82-4e89-9a86-13d51bc4a8d5 -enabled -blocking -settings @{MinimumApproverCount = 1;Scope=@(@{repositoryId=b87c5af8-1a82-4e59-9a86-13d5cbc4a8d5; matchKind="Exact"; refName="refs/heads/trunk"})}
This command updates an existing policy in the Demo project.
Specifies the policy to update.
Type: Int
Specifies the id of the type of policy to be update. This must match the original policy, it cannot be changed via this call.
Type: Guid
Required: True
Enables the policy
Type: Switch
Determines if the policy will block pushes to the branch if the policy is not adhered to.
Type: Switch
The settings for the policy.
Each policy type has it's own settings that will need to be set.
Type: Hashtable
Required: True