Skip to content

AzDoAgentPoolPermission

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

Parameters

Parameter Attribute DataType Description Allowed Values
PoolName Key System.String
GroupName Required System.String
Ensure Write Ensure Present, Absent
isInherited Write System.Boolean
Permissions Write System.Collections.Hashtable[]
LookupResult Read System.Collections.Hashtable

Description

Examples

Example 1

This example shows how to grant permissions on an agent pool.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoAgentPoolPermission 'AddAgentPoolPermission'
        {
            Ensure      = 'Present'
            PoolName    = 'MyPool'
            GroupName   = 'MyGroup'
            isInherited = $true
            Permissions = @(
                @{ Permission = 'Use'; Access = 'Allow' }
            )
        }
    }
}

Example 2

This example shows how to update permissions on an agent pool.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoAgentPoolPermission 'UpdateAgentPoolPermission'
        {
            Ensure      = 'Present'
            PoolName    = 'MyPool'
            GroupName   = 'MyGroup'
            isInherited = $false
            Permissions = @(
                @{ Permission = 'Use';          Access = 'Allow' }
                @{ Permission = 'Administer';   Access = 'Deny' }
            )
        }
    }
}

Example 3

This example shows how to remove permissions on an agent pool.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoAgentPoolPermission 'RemoveAgentPoolPermission'
        {
            Ensure      = 'Absent'
            PoolName    = 'MyPool'
            GroupName   = 'MyGroup'
            isInherited = $true
        }
    }
}

Commands

Resources

Clone this wiki locally