Connect to a Windows VM's SAC Stay organized with collections Save and categorize content based on your preferences.
This document describes how to connect to theWindows Special Administrative Console (SAC).The SAC uses a serial port connection to a Windows virtual machine (VM) instanceand doesn't rely on network connectivity, which can help troubleshoot or recovera 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 PowerShellterminal to perform troubleshooting. For a general purpose remote desktopexperience 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 serialconsole, enable interactive access for your VM. For more information, seeEnabling interactive access on the serial console.
- If you haven't already, set upauthentication. 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:
gcloudinit
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update.- Set a default region and zone.
Connect to the Serial Console
To connect to your Windows instance using an interactive serial console,complete the steps in one of the following tabs.
Permissions required for this task
To perform this task, you must have the followingpermissions:
compute.instances.setMetadataon the VM if enabling interactive access on a specific VMcompute.projects.setCommonInstanceMetadataon the project, if enabling interactive access for all VMs in the projectiam.serviceAccountUserrole on the instance's service account
Console
In the Google Cloud console, go to theVM instances page.
Click the name of the VM you want to connect to.
ClickConnect to serial console to open the interactiveconsole.
The interactive serial console opens. It's ready to use when you see thefollowing output:
Computer is booting, SAC started and initialized.Use the "ch -?" command for information about using channels.Use the "?" command for general help.SAC>
If the interactive serial console is a blank screen with a blinking cursor,it is likely because theEmergency Management Servicesare off.Seetroubleshooting interactive serial consoleto learn how to resolve this issue.
gcloud
Use thegcloud compute connect-to-serial-portcommand to connect toVM instances that have serial port access enabled:
gcloud compute connect-to-serial-portVM_NAME \ --port=2 \ --zone=ZONE \ --project=PROJECT_ID
Replace the following:
PROJECT_ID: the ID of the project that containsthe VMZONE: the name of the zone in which theVM is locatedVM_NAME: the name of the VM
The interactive serial console opens. It is ready to use when you see thefollowing output:
Computer is booting, SAC started and initialized.Use the "ch -?" command for information about using channels.Use the "?" command for general help.SAC>
If the interactive serial console is a blank screen with a blinking cursor,it is likely because theEmergency Management Services are off.Seetroubleshooting interactive serial consoleto learn how to resolve this issue.
For information about using the interactive serial console, see the MicrosoftSAC Commands documentation.
Open Command Prompt in Windows SAC
To open Command Prompt in the SAC, do the following:
Type
cmd, then pressEnter. You see the following output:SAC>cmdThe Command Prompt session was successfully launched.SAC>EVENT: A new channel has been created. Use "ch -?" for channel help.Channel: Cmd0001SAC>
Use the
ch -snCHANNEL_NAMEcommand, then pressEnter.ch -snCHANNEL_NAME
Replace
CHANNEL_NAMEwith the name of thechannel you created in the previous step.The output is similar to the following:
Name: Cmd0001Description: CommandType: VT-UTF8Channel GUID: 28de7392-5413-11ea-bb03-c9656a2ed613Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0Press <esc><tab> for next channel.Press <esc><tab>0 to return to the SAC channel.Use any other key to view this channel.
PressSpace, then login with the local credentials registered on thesystem.
Note: If you are unsure of the credentials, you might be able tocreate orreset the password.Please enter login credentials.Username:USERNAMEDomain: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
Note: Pasting into the SAC Powershell terminal might result in repeatedcharacters in the pasted text. You can prevent this on a per-session basis by issuing thepowershell.exe, then pressEnter.Remove-Module PSReadLinecommand in your terminal.
What's next
- Learn how toconnect to Windows VMs using RDP
- Learn how totroubleshoot Interactive Serial Console.
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.