change logon
Enables or disables logons from client sessions, or displays current logon status. Windows commands reference
On Windows
Windows
Enables or disables logons from client sessions, or displays current logon status. This utility is useful for system maintenance. You must be an administrator to run this command. NOTE: To find out what's new in the latest version, see What's New in Remote Desktop Services in Windows Server.
change logon {/query | /enable | /disable | /drain | /drainuntilrestart}change logon /querychange logon /enablechange logon /disable
/queryDisplays the current logon status, whether enabled or disabled./enableEnables logons from client sessions, but not from the console./disableDisables subsequent logons from client sessions, but not from the console. Does not affect currently logged on users./drainDisables logons from new client sessions, but allows reconnections to existing sessions./drainuntilrestartDisables logons from new client sessions until the computer is restarted, but allows reconnections to existing sessions./?Displays help at the command prompt.