Skip to content

Latest commit

 

History

History
89 lines (52 loc) · 1.46 KB

Update-VSTeamPolicy.md

File metadata and controls

89 lines (52 loc) · 1.46 KB

Update-VSTeamPolicy

SYNOPSIS

SYNTAX

DESCRIPTION

EXAMPLES

Example 1

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.

PARAMETERS

Id

Specifies the policy to update.

Type: Int

type

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

enabled

Enables the policy

Type: Switch

blocking

Determines if the policy will block pushes to the branch if the policy is not adhered to.

Type: Switch

settings

The settings for the policy.

Each policy type has it's own settings that will need to be set.

Type: Hashtable
Required: True

INPUTS

OUTPUTS

NOTES

RELATED LINKS

Get-VSTeamPolicy

Remove-VSTeamPolicy

Get-VSTeamPolicyType