HOW TO: Turn Off Logons to a Terminal Server By Using the CHANGE LOGON Command in Windows 2000 (320183)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

This article was previously published under Q320183

SUMMARY

This step-by-step article describes how to disable logons to a terminal server by using the change logon command in Windows 2000 Terminal Services.

You can use the change logon command to enable or disable logons to the terminal server from client sessions, or to display the status of current logons.

When you disable logons, you prevent new client sessions from connecting to the server. Currently-logged-on users are not affected. You may want to use the change logon command to temporarily disable logons if you do not want clients to connect to the server for a period of time, such as when you want to complete server maintenance.

You must be an administrator or a member of the Administrators group to use the change logon command.

back to the top

Overview of the CHANGE LOGON Command

The change logon command uses the following syntax:

change logon /enable | /disable | /query

The parameters that are used by the change logon command are:
  • /enable: Use this parameter to turn on logons from client sessions.
  • /disable: Use this parameter to turn off any further logons from client sessions. Currently-logged-on users are not affected.
  • /query: Use this parameter to display the current logon status.
NOTES: The change logon command applies to logons from client sessions. Logons from the console session are not affected. Logons from client sessions are turned on again when you restart the server. If you turn off logons when you are connected to the terminal server from a client session, and then log off before you again turn on logons, you will not be able to reconnect to the server from your session. You must log on at the console, and then again turn on logons to connect from a client session.

back to the top

How to Use the CHANGE LOGON Command

The following examples are examples of how to use the change logon command to turn on and turn off logons from client sessions:
  • To disable all subsequent logons from client sessions, type change logon /disable at the command prompt, and then press ENTER. You receive the following message:

    Session logins are currently DISABLED

    When a user attempts to connect to the terminal server from a client session, the following message is displayed in a Terminal Server Session Disabled dialog box:

    Remote logins are currently disabled.

  • To enable logons from client sessions, type change logon /enable at the command prompt, and then press ENTER. You receive the following message:

    Session logins are currently ENABLED

back to the top

REFERENCES

For more information about the change logon command, visit the following Microsoft Web site: For more information about Windows 2000 Terminal Services, see the Terminal Services online documentation at the following Microsoft Web site: back to the top

Modification Type:MajorLast Reviewed:11/20/2003
Keywords:kbhowto kbHOWTOmaster kbnetwork KB320183 kbAudITPro