Skip to content

AzDoPipelineEnvironment

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

Parameters

Parameter Attribute DataType Description Allowed Values
ProjectName Key System.String
EnvironmentName Required System.String
Description Write System.String
Ensure Write Ensure Present, Absent
LookupResult Read System.Collections.Hashtable

Description

Examples

Example 1

This example shows how to create a pipeline environment in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipelineEnvironment 'AddAzDoPipelineEnvironment'
        {
            Ensure          = 'Present'
            ProjectName     = 'MyProject'
            EnvironmentName = 'Production'
            Description     = 'Production deployment environment'
        }
    }
}

Example 2

This example shows how to update a pipeline environment in an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipelineEnvironment 'UpdateAzDoPipelineEnvironment'
        {
            Ensure          = 'Present'
            ProjectName     = 'MyProject'
            EnvironmentName = 'Production'
            Description     = 'Production deployment environment - requires approval'
        }
    }
}

Example 3

This example shows how to remove a pipeline environment from an Azure DevOps project.

Configuration Example
{
    Import-DscResource -ModuleName 'AzureDevOpsDscNative'

    node localhost
    {
        AzDoPipelineEnvironment 'RemoveAzDoPipelineEnvironment'
        {
            Ensure          = 'Absent'
            ProjectName     = 'MyProject'
            EnvironmentName = 'Production'
        }
    }
}

Commands

Resources

Clone this wiki locally