Stay organized with collections
Save and categorize content based on your preferences.
Windows
This document describes how to connect to the
Windows Special Administrative Console (SAC).
The SAC uses a serial port connection to a Windows virtual machine (VM) instance
and doesn't rely on network connectivity, which can help troubleshoot or recover
a Windows VM instance. By connecting to the VM's serial console and using the SAC,
you can interrupt the VM's boot process or gain access to a CMD or PowerShell
terminal to perform troubleshooting. For a general purpose remote desktop
experience other than troubleshooting,
connect to Windows VMs using RDP.
Before you begin
Before you can connect to your VM's SAC by using the interactive serial
console, enable interactive access for your VM. For more information, see
Enabling interactive access on the serial console.
If you haven't already, set up authentication.
Authentication verifies your identity for access to Google Cloud services and APIs. To run
code or samples from a local development environment, you can authenticate to
Compute Engine by selecting one of the following options:
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and
APIs, you don't need to set up authentication.
gcloud
Install the Google Cloud CLI.
After installation,
initialize the Google Cloud CLI by running the following command:
Click Connect to serial console to open the interactive
console.
The interactive serial console opens. It's ready to use when you see the
following output:
Computer is booting, SAC started and initialized.
Use the "ch -?" command for information about using channels.
Use the "?" command for general help.
SAC>
PROJECT_ID: the ID of the project that contains
the VM
ZONE: the name of the zone in which the
VM is located
VM_NAME: the name of the VM
The interactive serial console opens. It is ready to use when you see the
following output:
Computer is booting, SAC started and initialized.
Use the "ch -?" command for information about using channels.
Use the "?" command for general help.
SAC>
For information about using the interactive serial console, see the Microsoft
SAC Commands documentation.
Open Command Prompt in Windows SAC
To open Command Prompt in the SAC, do the following:
Type cmd, then press Enter. You see the following output:
SAC>cmd
The Command Prompt session was successfully launched.
SAC>
EVENT: A new channel has been created. Use "ch -?" for channel help.
Channel: Cmd0001
SAC>
Use the ch -sn CHANNEL_NAME command, then press
Enter.
ch -sn CHANNEL_NAME
Replace CHANNEL_NAME with the name of the
channel you created in the previous step.
The output is similar to the following:
Name: Cmd0001
Description: Command
Type: VT-UTF8
Channel GUID: 28de7392-5413-11ea-bb03-c9656a2ed613
Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0
Press <esc><tab> for next channel.
Press <esc><tab>0 to return to the SAC channel.
Use any other key to view this channel.
Press Space, then login with the local credentials registered on the
system.
Please enter login credentials.
Username: USERNAME
Domain: DOMAIN (leave blank if no domain)
Password: PASSWORD
Once connected, you have access to a Command Prompt shell.
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Windows\system32>
Optional: To enter a Powershell prompt, type powershell.exe, then press
Enter.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eThis document details how to connect to the Windows Special Administrative Console (SAC) via a serial port, enabling troubleshooting and recovery of Windows virtual machine (VM) instances without network reliance.\u003c/p\u003e\n"],["\u003cp\u003eBefore connecting, ensure you enable interactive access for your VM and set up authentication as required for access to Google Cloud services and APIs.\u003c/p\u003e\n"],["\u003cp\u003eYou can connect to the serial console through the Google Cloud console or using the \u003ccode\u003egcloud\u003c/code\u003e command-line tool, both of which will display a prompt if successfully connected.\u003c/p\u003e\n"],["\u003cp\u003eWithin the SAC, you can access a Command Prompt by typing \u003ccode\u003ecmd\u003c/code\u003e and then use channel commands to interact, or optionally access a PowerShell prompt by typing \u003ccode\u003epowershell.exe\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe SAC is a valuable tool for accessing a CMD or PowerShell terminal for troubleshooting, or interrupting a VM's boot process, but it does not support IP based access restrictions.\u003c/p\u003e\n"]]],[],null,["Windows\n\n*** ** * ** ***\n\nThis document describes how to connect to the\n[Windows Special Administrative Console](https://technet.microsoft.com/en-us/library/cc787940) (SAC).\nThe SAC uses a serial port connection to a Windows virtual machine (VM) instance\nand doesn't rely on network connectivity, which can help troubleshoot or recover\na Windows VM instance. By connecting to the VM's serial console and using the SAC,\nyou can interrupt the VM's boot process or gain access to a CMD or PowerShell\nterminal to perform troubleshooting. For a general purpose remote desktop\nexperience other than troubleshooting,\n[connect to Windows VMs using RDP](/compute/docs/instances/connecting-to-windows).\n\nBefore you begin\n\n- Before you can connect to your VM's SAC by using the interactive serial console, enable interactive access for your VM. For more information, see [Enabling interactive access on the serial console](/compute/docs/troubleshooting/troubleshooting-using-serial-console#enabling_interactive_access_on_the_serial_console).\n- If you haven't already, set up [authentication](/compute/docs/authentication). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:\n\n Select the tab for how you plan to use the samples on this page: \n\n Console\n\n\n When you use the Google Cloud console to access Google Cloud services and\n APIs, you don't need to set up authentication.\n\n gcloud\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\n| **Caution:** The interactive serial console does not support IP-based access restrictions such as IP-based include lists or exclude lists. If you enable the interactive serial console on an instance, anyone from any IP address is able to connect if they know a local username, project ID, zone, and instance name.\n\nConnect to the Serial Console\n\nTo connect to your Windows instance using an interactive serial console,\ncomplete the steps in one of the following tabs.\n\nPermissions required for this task\n\nTo perform this task, you must have the following\n[permissions](/iam/docs/overview#permissions):\n\n\n- `compute.instances.setMetadata` on the VM if enabling interactive access on a specific VM\n- `compute.projects.setCommonInstanceMetadata` on the project, if enabling interactive access for all VMs in the project\n- `iam.serviceAccountUser` role on the instance's service account \n\nConsole\n\n1. In the Google Cloud console, go to the **VM instances** page.\n\n [Go to VM instances](https://console.cloud.google.com/compute/instances)\n2. Click the name of the VM you want to connect to.\n\n3. Click **Connect to serial console** to open the interactive\n console.\n\nThe interactive serial console opens. It's ready to use when you see the\nfollowing output: \n\n```\nComputer is booting, SAC started and initialized.\n\nUse the \"ch -?\" command for information about using channels.\nUse the \"?\" command for general help.\n\nSAC\u003e\n```\n\nIf the interactive serial console is a blank screen with a blinking cursor,\nit is likely because the [Emergency Management Services](https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/boot-parameters-to-enable-ems-redirection)\nare off.\nSee [troubleshooting interactive serial console](/compute/docs/troubleshooting/troubleshooting-windows#troubleshooting-interactive-serial-console)\nto learn how to resolve this issue.\n\ngcloud\n\nUse the [`gcloud compute connect-to-serial-port`\ncommand](/sdk/gcloud/reference/compute/connect-to-serial-port) to connect to\nVM instances that have serial port access enabled: \n\n```\ngcloud compute connect-to-serial-port VM_NAME \\\n --port=2 \\\n --zone=ZONE \\\n --project=PROJECT_ID\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project that contains the VM\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the name of the zone in which the VM is located\n- \u003cvar translate=\"no\"\u003eVM_NAME\u003c/var\u003e: the name of the VM\n\nThe interactive serial console opens. It is ready to use when you see the\nfollowing output: \n\n```\nComputer is booting, SAC started and initialized.\n\nUse the \"ch -?\" command for information about using channels.\nUse the \"?\" command for general help.\n\nSAC\u003e\n```\n\nIf the interactive serial console is a blank screen with a blinking cursor,\nit is likely because the [Emergency Management Services](https://learn.microsoft.com/en-us/windows-hardware/drivers/devtest/boot-parameters-to-enable-ems-redirection)\nare off.\nSee [troubleshooting interactive serial console](/compute/docs/troubleshooting/troubleshooting-windows#troubleshooting-interactive-serial-console)\nto learn how to resolve this issue.\n\nFor information about using the interactive serial console, see the Microsoft\n[SAC Commands documentation](https://technet.microsoft.com/en-us/library/cc787940#sac-commands).\n\nOpen Command Prompt in Windows SAC\n\nTo open Command Prompt in the SAC, do the following:\n\n1. Type `cmd`, then press **Enter**. You see the following output:\n\n ```\n SAC\u003ecmd\n The Command Prompt session was successfully launched.\n SAC\u003e\n EVENT: A new channel has been created. Use \"ch -?\" for channel help.\n Channel: Cmd0001\n SAC\u003e\n ```\n2. Use the `ch -sn `\u003cvar translate=\"no\"\u003eCHANNEL_NAME\u003c/var\u003e command, then press\n **Enter**.\n\n ```\n ch -sn CHANNEL_NAME\n ```\n\n Replace \u003cvar translate=\"no\"\u003eCHANNEL_NAME\u003c/var\u003e with the name of the\n channel you created in the previous step.\n\n The output is similar to the following: \n\n ```\n Name: Cmd0001\n Description: Command\n Type: VT-UTF8\n Channel GUID: 28de7392-5413-11ea-bb03-c9656a2ed613\n Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0\n\n Press \u003cesc\u003e\u003ctab\u003e for next channel.\n Press \u003cesc\u003e\u003ctab\u003e0 to return to the SAC channel.\n Use any other key to view this channel.\n ```\n3. Press **Space**, then login with the local credentials registered on the\n system.\n\n ```\n Please enter login credentials.\n Username: USERNAME\n Domain: DOMAIN (leave blank if no domain)\n Password: PASSWORD\n ```\n | **Note:** If you are unsure of the credentials, you might be able to [create or\n | reset the password](/compute/docs/instances/windows/creating-passwords-for-windows-instances).\n\n Once connected, you have access to a Command Prompt shell. \n\n ```\n Microsoft Windows [Version 10.0.14393]\n (c) 2016 Microsoft Corporation. All rights reserved.\n\n C:\\Windows\\system32\u003e\n ```\n4. Optional: To enter a Powershell prompt, type `powershell.exe`, then press\n **Enter**.\n\n | **Note:** Pasting into the SAC Powershell terminal might result in repeated characters in the pasted text. You can prevent this on a per-session basis by issuing the `Remove-Module PSReadLine` command in your terminal.\n\nWhat's next\n\n- Learn how to [connect to Windows VMs using RDP](/compute/docs/instances/connecting-to-windows)\n- Learn how to [troubleshoot Interactive Serial Console](/compute/docs/troubleshooting/troubleshooting-windows#troubleshooting-interactive-serial-console)."]]