- Windows log on and log off
- Start Using WinLogOnView
- Command-Line Options
- Windows logs on and logs off immediately
- Symptoms
- Cause
- Resolution
- Steps for rectifying this problem
- Turn on automatic logon in Windows
- Use Registry Editor to turn on automatic logon
- logoff logoff
- Синтаксис Syntax
- Параметры Parameters
- Комментарии Remarks
- Примеры Examples
- Log off in Windows 10
- Replies (29)
Windows log on and log off
Start Using WinLogOnView
If you want to get the logon/logoff information of a remote computer on your network, simply go to the Advanced Options window (F9), choose ‘Remote Computer’ as data source, and then type the name of the remote computer to connect.
If you want to get the logon/logoff information from external disk, simply choose ‘External Disk’ as data source and then type the path of the event log (Usually located under C:\Windows\System32\winevt\Logs)
Command-Line Options
/Source | Specifies the type of data source. 1 = Local Computer, 2 = Remote Computer, 3 = External Disk |
/Server | Specifies the remote computer to load. (For using with /Source 2 ) |
/ExternalFolder | Specifies the folder in external disk to load. (For using with /Source 3 ) |
/stext | Save the list of all logon sessions into a regular text file. |
/stab | Save the list of all logon sessions into a tab-delimited text file. |
/scomma | Save the list of all logon sessions into a comma-delimited text file (csv). |
/stabular | Save the list of all logon sessions into a tabular text file. |
/shtml | Save the list of all logon sessions into HTML file (Horizontal). |
/sverhtml | Save the list of all logon sessions into HTML file (Vertical). |
/sxml | Save the list of all logon sessions to XML file. |
/sort | This command-line option can be used with other save options for sorting by the desired column. If you don’t specify this option, the list is sorted according to the last sort that you made from the user interface. The parameter can specify the column index (0 for the first column, 1 for the second column, and so on) or the name of the column, like «User Name» and «Logon Time». You can specify the ‘ |
‘ prefix character (e.g: «
User Name») if you want to sort in descending order. You can put multiple /sort in the command-line if you want to sort by multiple columns.
Windows logs on and logs off immediately
This article describes an issue where you can’t sign in to the system and you’re prompted for user name and password repeatedly.
Original product version: В Windows Server 2003
Original KB number: В 555648
Symptoms
Windows logs on and logs off immediately when you try logging on to Windows. When you type the user name and password, you’re again presented with User name and Password dialogue box. You try hard to get in but to no avail.
Cause
You can’t log on to system using either Normal Mode or Safe Mode. This occurs only when Winlogon service tries to load the Windows default shell (explorer.exe) and user shell (userinit.exe) from registry. This service searches for Explorer.exe and Userinit.exe in the following path of registry:
Resolution
Edit these values and type the correct path of shell:
Shell = explorer.exe
Userinit=X:\windows\system32\userinit.exe
These files may also be deleted by spywares. You may need to extract them using Windows CD.
Steps for rectifying this problem
Log on to a networked computer.
Point your cursor to HKEY_LOCAL_MACHINE .
Select File > Connect Remote Registry.
Type the computer name (infected computer).
Navigate to the following location in registry of destination or infected computer:
Edit these two values in right pane:
Change these two values to
Shell=explorer.exe
Userinit = x:\windows\system32\userinit.exe
Exit from Registry.
Restart the infected computer.
You should be able to log on to the computer.
Community Solutions Content Disclaimer
MICROSOFT CORPORATION AND/OR ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY, RELIABILITY, OR ACCURACY OF THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN. ALL SUCH INFORMATION AND RELATED GRAPHICS ARE PROVIDED «AS IS» WITHOUT WARRANTY OF ANY KIND. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THIS INFORMATION AND RELATED GRAPHICS, INCLUDING ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, WORKMANLIKE EFFORT, TITLE AND NON-INFRINGEMENT. YOU SPECIFICALLY AGREE THAT IN NO EVENT SHALL MICROSOFT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, PUNITIVE, INCIDENTAL, SPECIAL, CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF USE, DATA OR PROFITS, ARISING OUT OF OR IN ANY WAY CONNECTED WITH THE USE OF OR INABILITY TO USE THE INFORMATION AND RELATED GRAPHICS CONTAINED HEREIN, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY OR OTHERWISE, EVEN IF MICROSOFT OR ANY OF ITS SUPPLIERS HAS BEEN ADVISED OF THE POSSIBILITY OF DAMAGES.
Turn on automatic logon in Windows
This article describes how to configure Windows to automate the logon process by storing your password and other pertinent information in the registry database. By using this feature, other users can start your computer and use the account that you establish to automatically log on.
Original product version: В Windows Server 2019, Windows Server 2016, Windows Server 2012 R2
Original KB number: В 324737
The autologon feature is provided as a convenience. However, this feature may be a security risk. If you set a computer for autologon, anyone who can physically obtain access to the computer can gain access to all the computer’s contents, including any networks it is connected to. Additionally, when autologon is turned on, the password is stored in the registry in plain text. The specific registry key that stores this value can be remotely read by the Authenticated Users group. This setting is recommended only for cases in which the computer is physically secured and steps have been taken to make sure that untrusted users cannot remotely access the registry.
Use Registry Editor to turn on automatic logon
This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see How to back up and restore the registry in Windows.
To use Registry Editor to turn on automatic logon, follow these steps:
Click Start, and then click Run.
In the Open box, type Regedit.exe, and then press Enter.
Locate the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon subkey in the registry.
Double-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password, and then click OK.
If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
On the Edit menu, click New, and then point to String Value.
Type DefaultPassword, and then press Enter.
Double-click DefaultPassword.
In the Edit String dialog, type your password and then click OK.
If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.
On the Edit menu, click New, and then point to String Value.
Type AutoAdminLogon, and then press Enter.
Double-click AutoAdminLogon.
In the Edit String dialog box, type 1 and then click OK.
If you have joined the computer to a domain, you should add the DefaultDomainName value, and the data for the value should be set as the fully qualified domain name (FQDN) of the domain, for example contoso.com. .
Exit Registry Editor.
Click Start, click Shutdown, and then type a reason in the Comment text box.
Click OK to turn off your computer.
Restart your computer. You can now log on automatically.
- To bypass the AutoAdminLogon process and to log on as a different user, press and hold the Shift key after you log off or after Windows restarts.
- This registry change does not work if the Logon Banner value is defined on the server either by a Group Policy object (GPO) or by a local policy. When the policy is changed so that it does not affect the computer, the autologon feature works as expected.
- When Exchange Active Sync (EAS) password restrictions are active, the autologon feature does not work. This behavior is by design. This behavior is caused by a change in Windows 8.1 and does not affect Windows 8 or earlier versions. To work around this behavior in Windows 8.1 and later versions, remove the EAS policies in Control Panel.
- An interactive console logon that has a different user on the server changes the DefaultUserName registry entry as the last logged-on user indicator. AutoAdminLogon relies on the DefaultUserName entry to match the user and password. Therefore, AutoAdminLogon may fail. You can configure a shutdown script to set the correct DefaultUserName.
- You can use the Sysinternals tool AutoLogon to enable this functionality easier. This tool also helps you to use an encrypted version of password.
logoff logoff
Область применения: Windows Server (половина ежегодного канала), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012 Applies to: Windows Server (Semi-Annual Channel), Windows Server 2019, Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
Выполнит выход пользователя из сеанса на удаленный рабочий стол сервере узла сеансов и удалит сеанс. Logs off a user from a session on a Remote Desktop Session Host server and deletes the session.
Синтаксис Syntax
Параметры Parameters
Параметр Parameter | Описание Description |
---|---|
Указывает имя сеанса. Specifies the name of the session. Это должен быть активный сеанс. This must be an active session. | |
Указывает числовой идентификатор, определяющий сеанс на сервере. Specifies the numeric ID which identifies the session to the server. | |
/server: /server: | Указывает сервер узла сеансов удаленный рабочий стол, содержащий сеанс, для которого пользователь должен выйти из системы. Specifies the Remote Desktop Session Host server that contains the session whose user you want to log off. Если не указано, используется сервер, на котором активна в данный момент. If unspecified, the server on which you are currently active is used. |
/v /v | Отображает сведения о выполняемых действиях. Displays information about the actions being performed. |
/? /? | Отображение справки в командной строке. Displays help at the command prompt. |
Комментарии Remarks
Вы всегда можете выйти из сеанса, к которому в данный момент выполнен вход. You can always log off yourself from the session to which you are currently logged on. Однако необходимо иметь разрешение « полный доступ» для выхода пользователей из других сеансов. You must, however, have Full Control permission to log off users from other sessions.
Выход пользователя из сеанса без предупреждения может привести к утрате данных в сеансе пользователя. Logging off a user from a session without warning can result in loss of data at the user’s session. Необходимо отправить пользователю сообщение с помощью команды MSG , чтобы предупредить пользователя перед выполнением этого действия. You should send a message to the user by using the msg command to warn the user before taking this action.
Если параметр или не указан, функция выхода из системы выполняет выход пользователя из текущего сеанса. If or isn’t specified, logoff logs the user off from the current session.
После выхода пользователя из системы все процессы завершаются, а сеанс удаляется с сервера. After you log off a user, all processes end and the session is deleted from the server.
Пользователь не может выйти из сеанса консоли. You can’t log off a user from the console session.
Примеры Examples
Для выхода пользователя из текущего сеанса введите: To log off a user from the current session, type:
Для выхода пользователя из сеанса с помощью идентификатора сеанса, например сеанса 12, введите: To log off a user from a session by using the session’s ID, for example session 12, type:
Для выхода пользователя из сеанса с использованием имени сеанса и сервера, например Session TERM04 на сервере Server1, введите: To log off a user from a session by using the name of the session and server, for example session TERM04 on Server1, type:
Log off in Windows 10
Clicking on the power selection in the Start menu in Windows 10 does not give me a Log off option, only Sleep, Shutdown, or Restart. There are two users for my PC and in earlier versions of Windows you were able to Log off and another user could log on without having to restart or shutdown the computer first.
Has the log off function been taken away for Windows 10?
Replies (29)
* Please try a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter only numbers.
Right-click on the Start button and choose Shut down or sign out.
Click on your user name at the top of the Start menu and a dropdown list appears, choose Sign out. [Choosing another user name from that list instead does not log out the current user as it’s the equivalent of the Windows 7 procedure for switching user]
188 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Clicking on the power selection in the Start menu in Windows 10 does not give me a Log off option, only Sleep, Shutdown, or Restart. There are two users for my PC and in earlier versions of Windows you were able to Log off and another user could log on without having to restart or shutdown the computer first.
Has the log off function been taken away for Windows 10?
You know that the name of the user does not always appear when you click the start button. and there is not a sign off option in the power icon. The only way we have been able to change users is to restart the computer, A real pain. I do not understand why the box with the user’s name only appears some times.
18 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
You can use one of the solutions I posted before. The first of my solutions does not depend on your Start menu correctly identifying the user.
If you want to investigate the user’s name not being shown in the Start menu then first search the forum for any existing guidance and then, if necessary, post a question of your own. I suggest that you include a screenshot of the incorrect Start menu in your question or you’ll just get replies asking you to do just that.
13 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
9 people found this reply helpful
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
This thread is about Windows 10 logging off not MSN. The considerations involved are not the same.
I suggest that you search the Outlook.com section of this forum for guidance [it includes issues concerning all of Microsoft’s online service provision such as MS Accounts & MSN]. You’ll probably also find some relevant threads in the Windows 10 Security, privacy & accounts section.
My only observations are so general that they are probably not useful.
The intended use of user accounts within Windows 10 is that each individual using the computer has a separate user account on that computer.
If the user choses to link that user account to an MS Account as you have done then it would not cause any problems as all other users of the computer would sign on to their own user accounts on the computer and, if relevant, to their own MS Accounts.
You can log off from one user account on the computer and then log on to another user account on the computer quite quickly.
If you cannot use this separation of accounts on your machine then you are likely to get recurrent privacy problems. All I can suggest is that you:
- Change your account on the computer to a «local user account» instead of an «MS Account» [this is done within Settings and you should be able to find a procedure for this in Windows Help if you are not sure about it].
- Use the account links in the top right of the MSN page to log off and then log back on again straight away but make sure that, when you enter your user name and password, you check that the remember me / always keep me logged in box is cleared and then you log out again.
- After that, you should never be bothered by automatic logging in again.
But removing automatic logins will probably be a far less satisfactory solution in the longer term than setting up an account for each individual using the computer as that is the way that Windows 10 & all Microsoft’s online services are designed to work.