Change logon command in Windows
The change logon command enables or disables login from client sessions or displaying the current login status. This utility is very useful for system maintenance.
- Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012.
The change logon command enables or disables login from client sessions or displaying the current login status. This utility is very useful for system maintenance. To find examples of how to use this command, please go to the Example below.
Note
In Windows Server 2008 R2, Terminal Services has been renamed to Remote Desktop Services.
Command syntax change logon
change logon {/ query | / enable | / disable | / drain | / drainuntilrestart}
Parameters
Description / query parameter Displays the current login status, whether enabled or disabled. / enable Allow logging in from the guest session, but not from the control panel. / disable Disable subsequent logins from guest sessions, but not from the control panel. Does not affect the user currently logged in. / drain Disable login from the new guest session but allow connection to the current session. / drainuntilrestart The login information is disabled from the new guest sessions until the computer restarts, but allows connecting to existing sessions. /? Show help at the command prompt.Note
- Only the administrator can use the change logon command.
- Logins are reactivated when you restart the system. If you are connected to the Remote Desktop Session Host (rd Session Host) server from the guest session and disable login, then log out before activating the login again, you will not be able to reconnect to your session. . To re-enable logins from client sessions, log in to the console.
For example
To display the current login status, enter:
change logon / query
To enable login from guest sessions, enter:
change logon / enable
To disable login from the client, enter:
change logon / disable
See more:
- Change command in Windows
- Cd command in Windows
- The cacls command in Windows
4 ★ | 53 Vote
You should read it
- Change Logon screen on Windows 7
- Change the Windows 7 and 10 Logon screen backgrounds
- Change command in Windows
- Change port command in Windows
- The command changes user in Windows
- What is Windows Logon Application and why is it running on the system?
- How to Enable Automatic Logon in Windows XP
- How to fix the error The User Profile Service failed the logon. Không thể nạp được người dùng profile
- Basic Linux commands everyone needs to know
- Del command in Windows
- Fix the problem of not logging into Windows
- How to change the folder in Command Prompt on Windows 10
Maybe you are interested
5 Reasons People Prefer Password Login Over Email
How to change Windows 10 login wallpaper, change computer wallpaper
Detecting a new ransomware strain that specializes in stealing login information from the Chrome browser
8 Facebook login errors and how to fix them
How to log in to Facebook on computer using QR code - Login to Facebook web by phone
Microsoft supports passwordless login on Windows, Android and iOS