Skip to content

What is CHGLOGON Windows command?

The Windows chglogon command enables users to change user logon information effortlessly. This command allows users to modify usernames and passwords with ease. By utilizing the chglogon command, users can update their login details quickly and effectively. This feature provides a convenient way to manage user credentials within the Windows operating system. Ultimately, the chglogon command offers a seamless solution for users looking to modify their logon information without any hassle.

CHGLOGON Syntax:

Terminal window
chglogon [enable|disable]

CHGLOGON Options:

OptionDescription
enableEnables automatic logon
disableDisables automatic logon

Parameters:

ParameterDescription
enableEnables automatic logon with the specified user
disableDisables automatic logon

CHGLOGON Command Usage Examples:

Change the Logon Prompt Message

Terminal window
chglogon /random "Welcome to My Computer"

Changes the logon prompt message to “Welcome to My Computer”.

Reset Logon Prompt Message to Default

Terminal window
chglogon /random ""

Resets the logon prompt message to the default message.

Display Current Logon Prompt Message

Terminal window
chglogon /query

Displays the current logon prompt message.

Set Logon Prompt Message with Specific Text

Terminal window
chglogon /random "Enter your credentials to access the system."

Sets a custom logon prompt message as “Enter your credentials to access the system.”

Disable Logon Prompt Message

Terminal window
chglogon /disable

Disables the logon prompt message displayed during logon.

How do I use chglogon in CMD?

To use the chglogon command in CMD, execute the following command:

Terminal window
chglogon --logoff

What is the purpose of the chglogon command in Windows CMD?

The chglogon command in Windows CMD is used to change the logon options for a user session.

How can I logoff a user session using the chglogon command in CMD?

To logoff a user session using the chglogon command in CMD, you can use the following command:

Terminal window
chglogon --logoff

How do I switch users using the chglogon command in CMD?

To switch users using the chglogon command in CMD, you can use the following command:

Terminal window
chglogon --switchuser

Can I lock a user session using the chglogon command in CMD?

Yes, you can lock a user session using the chglogon command in CMD by executing the following command:

Terminal window
chglogon --lock

How do I unlock a locked user session with the chglogon command in CMD?

To unlock a locked user session using the chglogon command in CMD, you can use the following command:

Terminal window
chglogon --unlock

Can I change the password for a user session using the chglogon command in CMD?

Yes, you can change the password for a user session using the chglogon command in CMD by executing the following command:

Terminal window
chglogon --chgpwd

Applications of the CHGLOGON Command

  • Change the currently logged-on user
  • Automate user switching tasks