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.
Describe the bug
Before Azure CLI 2.40.0,
azcan be invoked byStart-Process:The entry script was migrated from
az.cmdtoaz.ps1(#23514) in 2.40.0.azcan no longer be invoked byStart-Process:This is because
Start-Processcan't invoke aps1script in a separate process.