Skip to content

Commit f2bf5e9

Browse files
author
Abdullah Bell
committed
updated article for publishing.
1 parent 4be3e52 commit f2bf5e9

2 files changed

Lines changed: 53 additions & 3 deletions

File tree

articles/bastion/bastion-connect-vm-rdp-windows.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Before you begin, verify that you meet the following criteria:
3131
|---|---|---|
3232
| Azure portal (browser) | Basic | None |
3333
| Azure portal with custom ports | Standard | None |
34-
| IP-based connection | Standard | [IP-based connection](connect-ip-address.md#enable-ip-based-connection) enabled |
34+
| IP-based connection | Standard | [IP-based connection](connect-ip-address.md#configure-bastion) enabled |
3535
| Native client (RDP) | Standard | [Native client support](native-client.md) enabled |
3636

3737
* Users connecting via RDP must have rights on the target virtual machine. If the user isn't a local administrator, add them to the **Remote Desktop Users** group.
@@ -87,7 +87,7 @@ Use the Azure portal to create a browser-based RDP connection to your Windows vi
8787
1. Select **Connect** to open the RDP connection to your virtual machine in a new browser tab.
8888

8989
> [!NOTE]
90-
> For troubleshooting tips, see [Troubleshooting RDP connections](troubleshoot-rdp.md) and [Troubleshoot Microsoft Entra sign in for a Windows virtual machine in Azure or Arc-enabled Windows Server](/entra/identity/devices/howto-vm-sign-in-azure-ad-windows#troubleshoot-sign-in-problems)
90+
> For troubleshooting tips, see [Troubleshooting RDP connections](troubleshoot.md) and [Troubleshoot Microsoft Entra sign in for a Windows virtual machine in Azure or Arc-enabled Windows Server](/entra/identity/devices/howto-vm-sign-in-azure-ad-windows#troubleshoot-sign-in-problems)
9191
9292

9393
# [IP address (portal)](#tab/ip-address)
@@ -124,7 +124,7 @@ Before you can connect using an IP address, you must enable IP-based connection
124124

125125
1. Select **Connect** to connect to your virtual machine.
126126

127-
For native client RDP connections via IP address, see the [Native client](#tab/native-client) tab.
127+
For native client RDP connections via IP address, see the **Native client** tab on this page.
128128

129129
# [Native client](#tab/native-client)
130130

@@ -148,6 +148,7 @@ For SSH and tunnel connections, see [Connect to a VM using Bastion and the Windo
148148

149149
## Next steps
150150

151+
* [Connect to a Windows VM using SSH](bastion-connect-vm-ssh-windows.md)
151152
* [What is Azure Bastion?](bastion-overview.md)
152153
* [Configure Microsoft Entra ID authentication](bastion-entra-id-authentication.md) for identity-based access.
153154
* [Configure Kerberos authentication](kerberos-authentication-portal.md) for domain-joined virtual machines.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
author: abell
3+
ms.service: azure-bastion
4+
ms.topic: include
5+
ms.date: 03/06/2026
6+
ms.author: abell
7+
---
8+
When a user connects to a Windows VM via RDP, they must have rights on the target VM. If the user isn't a local administrator, add the user to the Remote Desktop Users group on the target VM.
9+
10+
1. Sign in to your Azure account using `az login`. If you have more than one subscription, you can view them using `az account list` and select the subscription containing your Bastion resource using `az account set --subscription "<subscription ID>"`.
11+
12+
1. To connect via RDP, use the following example.
13+
14+
```azurecli
15+
az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>"
16+
```
17+
18+
1. After running the command, you're prompted to input your credentials. You can use either a local username and password, or your Microsoft Entra credentials. Once you sign in to your target VM, the native client on your computer opens up with your VM session via **MSTSC**.
19+
20+
> [!IMPORTANT]
21+
> Remote connection to VMs that are joined to Microsoft Entra ID is allowed only from Windows 10 or later PCs that are Microsoft Entra registered (starting with Windows 10 20H1), Microsoft Entra joined, or Microsoft Entra hybrid joined to the *same* directory as the VM.
22+
23+
#### Specify authentication method
24+
25+
Optionally, you can also specify the authentication method as part of the command.
26+
27+
* **Microsoft Entra authentication:** For Windows 10 version 20H2+, Windows 11 21H2+, and Windows Server 2022, use `--enable-mfa`. For more information, see [az network bastion rdp - optional parameters](/cli/azure/network/bastion?#az-network-bastion-rdp(bastion)-optional-parameters).
28+
29+
#### Specify a custom port
30+
31+
You can specify a custom port when you connect to a Windows VM via RDP.
32+
33+
One scenario where this could be especially useful would be connecting to a Windows VM via port 22. This is a potential workaround for the limitation with the *az network bastion ssh* command, which can't be used by a Windows native client to connect to a Windows VM.
34+
35+
To specify a custom port, include the field **--resource-port** in the sign-in command, as shown in the following example.
36+
37+
```azurecli
38+
az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-resource-id "<VMResourceId>" --resource-port "22"
39+
```
40+
41+
#### RDP to a Windows VM IP address
42+
43+
You can also connect to a VM private IP address, instead of the resource ID. Microsoft Entra authentication, and custom ports and protocols aren't supported when using this type of connection. For more information about IP-based connections, see [Connect to a VM - IP address](../articles/bastion/connect-ip-address.md).
44+
45+
Using the `az network bastion` command, replace `--target-resource-id` with `--target-ip-address` and the specified IP address to connect to your VM.
46+
47+
```azurecli
48+
az network bastion rdp --name "<BastionName>" --resource-group "<ResourceGroupName>" --target-ip-address "<VMIPAddress>"
49+
```

0 commit comments

Comments
 (0)