microsoft / microsoft/powerplatform-vscode

pac env list-settings doesn't return correct releasewave information

Open
#1,189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
277
Forks
60
Avg merge
1d 1h
Merged PRs (30d)
14

Description

We have over 50 environments, and I recently created a script to gather information on the release wave updates. While most of our environments have been updated to the 2025 Release Wave 1, a few still show as being under the 2024 Release Wave 2. Both the environment release wave status page in the admin center and the about page indicate that these environments are on the 2025 Release Wave 1. It's puzzling because the information is correct for more than half of the environments, but some are displaying incorrect update statuses.
I am in GCC.

Here is the script:

# Define types of environments to query
$envType = "Sandbox", "Production"

# Authenticate to the US Government instance
pac auth create -ci usgov

foreach ($type in $envType) {
    # Retrieve all environments for the given environment type
    $envs = pac admin list -t $type --json | ConvertFrom-Json

    foreach ($env in $envs) {
        $envName = $env.DisplayName

        # Skip if environment name suggests it's a DEV instance
        if ($envName -like "*DEV*") {
            continue
        }

        try {
            $envId = $env.EnvironmentId

            # Get the release wave settings for the environment
            $settings = pac env list-settings -env $envId --filter releasewavename
            if ($settings.Count -lt 3) {
                continue
            }

            # Parse the release wave value from the returned data
            $releaseWave = ($settings[2] -split " ")[1]

            # Create an object with the environment name and release wave
            $data = @{
                EnvironmentName = $envName
                ReleaseWave     = $releaseWave
            }

            # Append the collected data to a CSV file
            [PSCustomObject]$data | Export-Csv -Path c:\temp\env.csv -NoTypeInformation -Append
        }
        catch {
            Write-Output "An error occurred while processing the environment: $envName. Error details: $_" -ForegroundColor Red
        }
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the PowerShell script against GCC environments and inspect the output from pac env list-settings -env <id> --filter releasewavename. Compare the returned release wave with the environment release wave status page and about page; done when the command reports the correct value for affected environments.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.