Connect to Windows VMs using RDP

Windows

This document describes how to connect to Windows virtual machine (VM)instances using RDP. For other ways to connect to Windows VMs, see the followingguides:

Note: When a user connects to a VM, that user can use all of the IAM permissions granted to the service account attached to the VM.

Before you begin

Connect to Windows VMs by using RDP

Compute Engine supports multiple ways to connect to your Windows instances.

Connecting to Windows instances.

The best way to connect to the remote desktop of a Windows instance depends onmultiple factors:

If you have difficulty connecting using RDP, seeTroubleshootingRDP. If you can't connect toa Windows instance by using Remote Desktop, seeConnect to a Windows VM's SAC.

To connect to the remote desktop of a Windows instance, use one of the followingprocedures.

IAP Desktop

IAP Desktop is a Windows application that lets you manage multiple Remote Desktopconnections to Windows VM instances. IAP Desktop connects to VM instancesby usingIdentity-Aware Proxy TCP forwardingand does not require VM instances to have a public IP address.

Before you connect by using IAP Desktop, make sure that thefollowing prerequisites are met:

To connect to a VM instance by using IAP Desktop, do the following:

  1. In IAP Desktop, selectProfile >Add project.

  2. Enter the ID or name of your project, and clickOK.

  3. In theProject Explorer window, right-click the VM instance youwant to connect to and selectConnect.

    IAP Desktop.

For more information about IAP Desktop, see theGitHub projectpage.

Note: IAP Desktop is an open-source project and not an officially supportedGoogle product.

Remote Desktop Connection app

You can use the Microsoft Remote Desktop Connection app that is part ofWindows to connect to Windows instances.

Before you connect using the Microsoft Remote Desktop Connection app, makesure that one of the following prerequisites is met:

To connect with Microsoft Windows Remote Desktop, do the following:

  1. Create a Windows account andpasswordif you do not have one yet.

  2. To connect over the internet, use theexternal IP address.To connect by using Cloud VPN or Cloud Interconnect, use theinternal IP address.

    Identify the external and internal IP addresses of your Windows instanceby completing one of the following steps:

    • In the Google Cloud console, go to theVM instances page.

      Go to the VM instances page

    • By using the gcloud CLI, rungcloud compute instances list:

      gcloud compute instances list
  3. Open Microsoft Windows Remote Desktop Connection on your Windows machine.You can find the executable at%systemroot%\system32\mstsc.exe

    The Remote Desktop Connection dialog.

  4. In theComputer box, enter the IP address.

    If you've configured your instance to use a different port number forRDP, add it after the IP address, for example:1.2.3.4:3389.

  5. ClickConnect.

  6. Enter your username and password, and clickOK.

    If you have forgotten your password, you canreset it.

Chrome Remote Desktop

Chrome Remote Desktopis a service that lets you remotely access anothercomputer by using a web browser.Chrome Remote Desktop works on Windows, macOS, and Linux and does not requirethe VM instance to have a public IP address.

Before you connect by using Chrome Remote Desktop, make sure that thefollowing prerequisites are met:

To connect to a VM instance by using Chrome Remote Desktop, do thefollowing:

  1. On your local computer, go to theChrome Remote Desktop website.

  2. If you're not already signed in to Google, sign in with the same GoogleAccount that you used to set up the Chrome Remote Desktop service.

  3. Select the instance that you want to connect to.

  4. When you're prompted, enter the PIN that you created when installingthe Chrome Remote Desktop service, and click the arrow buttonto connect.

Other

You can connect to your Windows VM instances by using other RDP clients,such as clients developed for Android, iOS, Mac, and others. For a list ofofficially supported clients, seeMicrosoft Remote Desktopclients.

Before you connect, make sure that one of the following prerequisites ismet:

  • Your VM instance has a public IP address and yourfirewall rulesallow TCP ingress traffic from your client's public IP address tothe instance by using port 3389.
  • Your local network is connected to your VPC by usingVPN orCloud Interconnectand yourfirewall rulesallow TCP ingress traffic from your client's private IP address tothe instance by using port 3389.

To connect using other RDP clients, do the following:

  1. To connect over the internet, use theexternal IP address.To connect by using Cloud VPN or Cloud Interconnect, use theinternal IP address.

    Identify the external and internal IP addresses of your Windows instanceby completing one of the following steps:

    • In the Google Cloud console, go to theVM instances page.

      Go to the VM instances page

    • By using the gcloud CLI, rungcloud compute instances list:

      gcloud compute instances list
  2. Install the supported client according to the client's installationinstructions.

  3. Connect using the IP address of your instance, and authenticatewith your username and password for the instance.

If you have difficulty connecting using RDP, see theTroubleshooting RDP page. For information about RDP licensing, see theFAQ about Microsoft licenses.

Verify the RDP certificate

Verify the RDP certificate by viewing the serial port output from the initialboot of the VM or by using the appropriate PowerShell command from the SAC.

Serial port

  1. Verify the RDP certificate byviewing the output from serial port1during the initial boot of the Windows VM.

  2. Examine the output of serial port 1 during the initial boot of theWindows VM for the following:

    Serial port 1 (console) output for rdp-test......2021/03/31 15:53:58 GCEInstanceSetup: RDP certificate details: Subject: CN=rdp-test, Thumbprint: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......

PowerShell from the SAC

  1. Connect to the Windows SAC.

  2. Run the following PowerShell commands:

    # WinRM CertWrite-Host 'WinRM certificate details:'; Get-ChildItem 'Cert:\LocalMachine\My' | Where-Object { $_.Subject -like "CN=$env:COMPUTERNAME*" -and $_.NotAfter -gt $(Get-Date) -and $_.HasPrivateKey} |  Select-Object Subject, Thumbprint | Format-List# RDP CertWrite-Host 'RDP certificate details:'; Get-ChildItem 'Cert:\LocalMachine\Remote Desktop\' | Where-Object { $_.Subject -like "CN=$env:COMPUTERNAME*" -and $_.NotAfter -gt $(Get-Date) -and $_.HasPrivateKey} |  Select-Object Subject, Thumbprint | Format-List

    What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.