Skip to content

AzDoGitRepository

github-actions[bot] edited this page Aug 19, 2026 · 4 revisions

Parameters

Parameter Attribute DataType Description Allowed Values
RepositoryName Key System.String
ProjectName Required System.String The name of the Azure DevOps project where the Git repository is located.
Ensure Write Ensure Present, Absent
SourceRepository Write System.String The source repository URL.
LookupResult Read System.Collections.Hashtable

Description

The AzDoGitRepository class is a DSC resource that allows you to manage Azure DevOps Git repositories. It inherits from the AzDevOpsDscResourceBase class.

Examples

Example 1

This example shows how to add the Git Repository

Configuration Example
{

    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoGitRepository 'AddGitRepository'
        {
            Ensure               = 'Present'
            ProjectName          = 'Test Project'
            RepositoryName       = 'Test Repository'
        }
    }
}

Example 2

This example shows how to update the Git Repository

Example 3

This example shows how to remove a Git Repository.

Configuration Example
{

    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoGitRepository 'RemoveGitRepository'
        {
            Ensure               = 'Absent'
            ProjectName          = 'Test Project'
            RepositoryName       = 'Test Repository'
        }
    }
}

Commands

Resources

Clone this wiki locally