Skip to content

az can't be invoked by Start-Process since 2.40.0 #24005

@jiasli

Description

@jiasli

Describe the bug
Before Azure CLI 2.40.0, az can be invoked by Start-Process:

> Start-Process -FilePath az -NoNewWindow -ArgumentList version -Wait
{
  "azure-cli": "2.40.0",
  "azure-cli-core": "2.40.0",
  "azure-cli-telemetry": "1.0.8",
  "extensions": {
    "account": "0.2.3"
  }
}

The entry script was migrated from az.cmd to az.ps1 (#23514) in 2.40.0. az can no longer be invoked by Start-Process:

> Start-Process -FilePath az -NoNewWindow -ArgumentList version -Wait
Start-Process: This command cannot be run due to the error: %1 is not a valid Win32 application.

This is because Start-Process can't invoke a ps1 script in a separate process.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions