Change logon command in Windows
- 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 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
May be interested
- How to Change Directory in Command Promptthis article shows you how to change folders in the command prompt program on a windows computer. to change commands in command prompt, you must use an administrator account.
- Instructions on how to change the alarm when Logoff, Logon and shutdown on Windows 10on previous versions of windows 10, users can easily change the alarm when booting, locking the device and turning off the computer on their windows computer. however, for some reason, microsoft has removed the ability to customize the start-up tone and lock on windows 10. however, you can 'bring back' this function on wndows 10 with just a few steps. here.
- The bootcfg ems command in Windowsthe bootcfg ems command allows users to add or change settings to redirect the emergency management services console to a remote computer.
- How to Change Windows Logon Screenthis wikihow teaches you how to change the image that displays on the windows start-up screen. open the start menu. do this either by clicking the windows logo in the bottom-left corner of the screen, or by pressing your computer's key.
- How to customize the Command Prompt on Windowscommand prompt is a powerful tool that many people like to use. however, it looks a bit boring and unfriendly. fortunately, you can customize the command prompt according to your needs and preferences.
- How to change the file's attributes using the Attrib commandin windows, file attributes are settings associated with files on a computer that grant or deny certain rights to users or operating systems associated with accessing that file. the following article will show you how to change the properties of any file using attrib command in command prompt.
- Basic Linux commands everyone needs to knowwhen using linux, you should also learn basic linux commands to make operations quicker and easier. here are some basic commands on linux you should know.
- Thread command in windowsthe renaming command helps change file names or directories.
- Command mode in Windowsdisplay system status, change system settings or reconfigure port and connected device.
- Sub-commands in nslookup Windows command (Part 2)nslookup set all command, nslookup set class, nslookup set d2, alias nslookup set debug, nslookup set domain, nslookup set port, and nslookup set querytype in windows