Skip to content

[Shell] Azure CLI receives corrupted arguments in PowerShell #15529

Open
@jiasli

Description

Describe the bug

When invoking az in PowerShell, due to the known issue of PowerShell PowerShell/PowerShell#1995, arguments passed to Azure CLI may get corrupted. For example, literal double quotes (") are lost:

# PowerShell
> az '{"signInAudience":"AzureADAndMicrosoftAccounts"}' --debug
Command arguments: ['{signInAudience:AzureADAndMicrosoftAccounts}', '--debug']

This contradicts the behavior of Bash:

# Bash
$ az '{"signInAudience":"AzureADAndMicrosoftAccounts"}' --debug
Command arguments: ['{"signInAudience":"AzureADAndMicrosoftAccounts"}', '--debug']

Impact

This is mainly affecting

Workaround

See https://github.com/Azure/azure-cli/blob/dev/doc/quoting-issues-with-powershell.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions