Skip to content

AzDoDeploymentGroup

Michael Zanatta edited this page Aug 19, 2026 · 4 revisions

DSC AzDoDeploymentGroup Resource

Syntax

AzDoDeploymentGroup [string] #ResourceName
{
    ProjectName           = [String]$ProjectName
    DeploymentGroupName   = [String]$DeploymentGroupName
    [ Description         = [String]$Description ]
    [ Tags                = [String[]]$Tags ]
    [ Ensure              = [String] {'Present', 'Absent'} ]
}

Properties

Common Properties

  • ProjectName: The name of the Azure DevOps project. This property is mandatory and serves as a key property for the resource.
  • DeploymentGroupName: The name of the deployment group. This is a key property.
  • Description: An optional description for the deployment group.
  • Tags: An array of tag strings to associate with the deployment group for filtering and targeting.
  • Ensure: Specifies whether the deployment group should exist. Valid values are Present and Absent.

Additional Information

This resource manages Azure DevOps deployment groups, which are collections of physical or virtual machines used as deployment targets for classic release pipelines. Agents installed on these machines register with the deployment group to receive deployments.

Examples

Example 1: Sample Configuration using AzDoDeploymentGroup Resource

Configuration ExampleConfig {
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    Node localhost {
        AzDoDeploymentGroup AddDeploymentGroup {
            Ensure              = 'Present'
            ProjectName         = 'MyProject'
            DeploymentGroupName = 'ProductionServers'
            Description         = 'Deployment group for production web servers'
            Tags                = @('Production', 'Windows', 'IIS')
        }
    }
}

Start-DscConfiguration -Path ./ExampleConfig -Wait -Verbose

Example 2: Sample Configuration using Invoke-DSCResource

# Return the current configuration for AzDoDeploymentGroup
$properties = @{
    ProjectName         = 'MyProject'
    DeploymentGroupName = 'ProductionServers'
}

Invoke-DscResource -Name 'AzDoDeploymentGroup' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'

Example 3: Sample Configuration using Dsc.PipelineRunner

parameters: {}

variables: {
  ProjectName: MyProject,
  DeploymentGroupName: ProductionServers
}

resources:
- name: Production Servers Deployment Group
  type: AzureDevOpsDscNative/AzDoDeploymentGroup
  dependsOn:
    - AzureDevOpsDscNative/AzDoProject/MyProject
  properties:
    ProjectName: $ProjectName
    DeploymentGroupName: $DeploymentGroupName
    Description: Deployment group for production web servers
    Tags:
      - Production
      - Windows
      - IIS
    Ensure: Present

LCM Initialization:

$params = @{
    AzureDevopsOrganizationName = "SampleAzDoOrgName"
    ConfigurationDirectory      = "C:\Datum\DSCOutput\"
    ConfigurationUrl            = 'https://configuration-path'
    JITToken                    = 'SampleJITToken'
    Mode                        = 'Set'
    AuthenticationType          = 'ManagedIdentity'
    ReportPath                  = 'C:\Datum\DSCOutput\Reports'
}

Invoke-DscPipelineRunner @params

Commands

Resources

Clone this wiki locally