azure-powershell icon indicating copy to clipboard operation
azure-powershell copied to clipboard

[Feature]: Azure Bastion Native Client Support in PowerShell

Open brwilkinson opened this issue 3 years ago • 3 comments

Description of the new feature

AzureCLI has an option to connect to a VM on port 3389 or 22 for RDP or SSH, using the 'Native Client'.

https://docs.microsoft.com/en-us/azure/bastion/connect-native-client-windows

az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>"

We have a few Bastion Network Cmdlets. These would also need updates to allow for the extra settings on the bastion that are in preview at the moment.

gcm -module az.network -Name *bastion*

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Get-AzBastion                                      4.14.0     az.network
Cmdlet          New-AzBastion                                      4.14.0     az.network
Cmdlet          Remove-AzBastion                                   4.14.0     az.network
Cmdlet          Set-AzBastion                                      4.14.0     az.network

image

Proposed implementation details (optional)

Add support, parity with az cli.

https://docs.microsoft.com/en-us/rest/api/virtualnetwork/bastion-hosts/create-or-update#request-body

brwilkinson avatar Feb 22 '22 23:02 brwilkinson

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @bastionsuppgithub.

Issue Details

Description of the new feature

AzureCLI has an option to connect to a VM on port 3389 or 22 for RDP or SSH, using the 'Native Client'.

https://docs.microsoft.com/en-us/azure/bastion/connect-native-client-windows

az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>"

We have a few Bastion Network Cmdlets. These would also need updates to allow for the extra settings on the bastion that are in preview at the moment.

gcm -module az.network -Name *bastion*

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Cmdlet          Get-AzBastion                                      4.14.0     az.network
Cmdlet          New-AzBastion                                      4.14.0     az.network
Cmdlet          Remove-AzBastion                                   4.14.0     az.network
Cmdlet          Set-AzBastion                                      4.14.0     az.network

image

Proposed implementation details (optional)

Add support, parity with az cli.

https://docs.microsoft.com/en-us/rest/api/virtualnetwork/bastion-hosts/create-or-update#request-body

Author: brwilkinson
Assignees: -
Labels:

feature-request, Service Attention, Network - Bastion

Milestone: -

ghost avatar Feb 23 '22 13:02 ghost

Following up on this one. My team would like to use Bastion native client but cannot use Azure CLI in all environments. Having this experience native to AZ CLI would be a huge help for us.

neilpeterson avatar May 04 '22 15:05 neilpeterson

Ping on status on this? (2 years after the last update)

I just ran into this issue and it looks like the AzCLI is currently a dependency for this one single feature?

OranguTech avatar Oct 04 '24 00:10 OranguTech

@bastionsuppgithub ☝ ?

OranguTech avatar May 13 '25 21:05 OranguTech

I also need a scripted way to set "native client support" for a bastion instance. No matter if its via Azure CLI (preferred) or directly via the REST API. Can we have please an update on this soon? Thank you

0xEmanuel avatar Aug 01 '25 10:08 0xEmanuel

@yonzhan can you please check if its routed correctly to the appropriate team? @bastionsuppgithub seems to be an empty account...

0xEmanuel avatar Aug 01 '25 10:08 0xEmanuel

Okey I realized that this "native client support" feature corresponds to the "tunneling" option in the CLI documentation:

Examples: Create): New-AzBastion -ResourceGroupName $rg -Name $name -PublicIpAddressId $publicIpId -VirtualNetworkRgName $vnet_rg -VirtualNetworkName $vnet_name -Sku "Standard" -EnableTunneling $true

or

Update): Set-AzBastion -InputObject $bastionObj -EnableTunneling $true

FYI @OranguTech @brwilkinson @neilpeterson

0xEmanuel avatar Aug 01 '25 13:08 0xEmanuel