In this article, we’ll explore effective solutions for addressing a common issue encountered with Windows servers on Microsoft Azure: sessions getting stuck on the “Signing Out” screen. We will provide step-by-step instructions on how to resolve this problem without the need to reboot the virtual machine, ensuring minimal disruption and maintaining server availability. Our guide is designed to help you quickly regain access and functionality, even when traditional methods fail.
Solution
Prerequisites : Boot diagnostics must be enabled for the instance .
- Accessing Windows Server Serial console:
- Once the console is connected, you will get the SAC prompt.
``` Computer is booting, SAC started and initialized. Use the "ch -?" command for information about using channels. Use the "?" command for general help. ```
``` SAC> EVENT: The CMD command is now available. SAC> ```
- Type “cmd” to create the to the server console channel.
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 channel number to connect to the instance console. Use command “ch -si 1” and press Enter.
SAC> ch -si 1 Name: Cmd0001 Description: Command Type: VT-UTF8 Channel GUID: e7f52da4-203b-11ea-a80f-000d3a7b44b4 Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0 Press for next channel. Press 0 to return to the SAC channel. Use any other key to view this channel.
- Enter the windows instance user credentials to access windows command prompt.
Please enter login credentials. Username: lingesh Domain : Password:
- Once you have authenticated successfully, you will get windows command prompt like below.
- Run the Command to See Connected Users
query user
- Log off the stuck session:
logoff <session_id>
Example : logoff 4
And like that when you try again to connect to RDP , you will find that the issue is resolved .