Azure / Azure/azure-cli-extensions
azure-devops commands corrupt the powershell console and prevent further output
- Dominant language
- Python
- Stars
- 454
- Forks
- 1.7k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 64
Description
### azure-devops
### Description of issue
Running the following command in a powershell window corrupts the console so the output generated is black on black, including the prompt when the command finishes.
$Result = (az pipelines show --organization $ADOUri --project $ADOProjectName --name $PipelineName)
You can work around this issue by creating the following function then calling it after the command is executed:
$PSBackgroundColor = $Host.UI.RawUI.BackgroundColor
$PSForegroundColor = $Host.UI.RawUI.ForegroundColor
function Reset-Console {
$Host.UI.RawUI.BackgroundColor = $PSBackgroundColor
$Host.UI.RawUI.ForegroundColor = $PSForegroundColor
}
The same issue occurs for multiple other commands, and it only seems to happen for commands that output the following message:
This command is in preview. It may be changed/removed in a future release.

The x is me entering a character into the now invisible prompt.
Highlighting the text and copying it into a text editor shows the text, so it is rendering as black on black.
Contributor guide
Assessment
This issue has not been assessed yet.