I am attempting to use the az network bastion rdp
command to connect to an Azure Windows VM using the native RDP client in Windows. This feature is currently in preview.
az network bastion rdp \
--name 'bastion-WestUS2' \
--resource-group 'rg-bastiondemo' \
--target-resource-id '/subscriptions/<sub id>/resourceGroups/RG-BASTIONDEMO/providers/Microsoft.Compute/virtualMachines/winserver01'
When trying to connect, the command returns "Please enter a valid virtual machine resource ID". This occurs on Windows 10 using Git Bash with Azure CLI version 2.32.0.
I can run the same command in PowerShell 7 (replacing with correct multiline characters) and I can connect just fine. This shows the resource ID is correct.
I created a GitHub issue here (https://github.com/Azure/azure-cli/issues/21056) with no luck so far.
Any thoughts on what I might be missing when trying to run this in Git Bash versus PowerShell?
I can confirm that this is still a problem as of 08-Mar 2023.