Skip to content

AzDoGroupMember

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

Parameters

Parameter Attribute DataType Description Allowed Values
GroupName Key System.String The name of the Azure DevOps group.
GroupMembers Required System.String[] An array of strings representing the members of the Azure DevOps group.
Ensure Write Ensure Present, Absent
LookupResult Read System.Collections.Hashtable

Description

The AzDoGroupMember class is a DSC resource that allows you to manage the members of an Azure DevOps group. It inherits from the AzDevOpsDscResourceBase class.

Examples

Example 1

This example shows how to add groups to a membership.

Configuration Example
{

    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoGroupMember 'AddAzDoGroupMember'
        {
            Ensure               = 'Present'
            GroupName            = '[ProjectName|OrganizationName]\GroupName'
            GroupMembers         = @(
                '[Project]\Readers'
                '[OrganizationName]\Project Collection Administrators'
            )
        }
    }
}

Example 2

TThis example shows how to update the group membership.

Configuration Example
{

    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoGroupMember 'UpdateAzDoGroupMember'
        {
            Ensure               = 'Present'
            GroupName            = '[ProjectName|OrganizationName]\GroupName'
            GroupMembers         = @(
                '[Project]\New Group Name'
                '[OrganizationName]\Project Collection Administrators'
            )
        }
    }
}

Example 3

This example shows how to remove a group membership.

Configuration Example
{

    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoGroupMember 'RemoveAzDoGroupMember'
        {
            Ensure               = 'Present'
            GroupName            = '[ProjectName|OrganizationName]\GroupName'
            # Ensure: Absent is not required. Zeroing out the membership is sufficent.
            GroupMembers         = @()
        }
    }
}

Commands

Resources

Clone this wiki locally