Change logon


Applies To: Windows Vista,Windows Server 2008

Enables or disables logons from client sessions, or displays current logon status.

This utility is useful for system maintenance.

For examples of how to use this command, see Examples.

Syntax


Copy Code

change logon {/query | /enable | /disable | /drain | /drainuntilrestart}

Parameters

Parameter

Description

/query

Displays the current logon status, whether enabled or disabled.

/enable

Enables logons from client sessions, but not from the console.

/disable

Disables subsequent logons from client sessions, but not from the console. Does not affect currently logged on users.

/drain

Disables logons from new client sessions, but allows reconnections to existing sessions.

/drainuntilrestart

Disables logons from new client sessions until the computer is restarted, but allows reconnections to existing sessions.

/?

Displays help at the command prompt.

Remarks

Examples


Copy Code

change logon /query


Copy Code

change logon /enable


Copy Code

change logon /disable

Additional references

Command-Line Syntax Key

Change

Terminal Services Command Reference