Skip to content

AzDoOrganizationGroup

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

DSC AzDoOrganizationGroup Resource

Syntax

AzDoOrganizationGroup [string] #ResourceName
{
    GroupName = [String]$GroupName
    [ GroupDescription = [String]$GroupDescription ]
    [ Ensure = [String] {'Present', 'Absent'} ]
}

Properties

Common Properties

  • GroupName: The name of the organization group. This property is mandatory and serves as the key property for the resource.
  • GroupDescription: A description of the organization group.
  • Ensure: Specifies whether the organization group should exist. Defaults to 'Present'.

Additional Information

This resource is used to manage Azure DevOps organization groups using Desired State Configuration (DSC). It allows you to define the properties of an Azure DevOps organization group and ensures that the group is configured according to those properties.

Examples

Example 1: Sample Configuration using AzDoOrganizationGroup Resource

Configuration ExampleConfig {
    Import-DscResource -ModuleName 'AzDevOpsDsc'

    Node localhost {
        AzDoOrganizationGroup OrgGroup {
            Ensure              = 'Present'
            GroupName           = 'SampleGroup'
            GroupDescription    = 'This is a sample group!'
        }
    }
}

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

Example 2: Sample Configuration using Invoke-DSCResource

# Return the current configuration for AzDoOrganizationGroup
# Ensure is not required
$properties = @{
    GroupName = 'SampleGroup'
    GroupDescription = 'This is a sample group!'
}

Invoke-DSCResource -Name 'AzDoOrganizationGroup' -Method Get -Property $properties -ModuleName 'AzureDevOpsDscNative'

Example 3: Sample Configuration using AzDO-DSC-LCM

parameters: {}

variables: {
   "PlaceHolder2": "PlaceHolder"  
}

resources:
- name: Team Leaders Organization Group
  type: AzureDevOpsDscNative/AzDoOrganizationGroup
  properties:
    GroupName: AZDO_TeamLeaders_Group
    GroupDescription: Team Leaders Organization Group

- name: Service Accounts Organization Group
  type: AzureDevOpsDscNative/AzDoOrganizationGroup
  properties:
    GroupName: AZDO_ServiceAccounts_Group
    GroupDescription: Service Accounts Organization Group

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-AzDoLCM @params

Commands

Resources

Clone this wiki locally