- How do I log on as an administrator?
- Turn on automatic logon in Windows
- Use Registry Editor to turn on automatic logon
- Manage User Access Logging
- Disabling and enabling the UAL service
- To stop and disable the UAL service by using the Services console
- To stop and disable UAL from the command line
- To start and enable the UAL service by using the Services console
- To start and enable UAL from the command line
- Collecting UAL data
- To adjust the default 24-hour interval to make data visible to the WMI provider
- Deleting data logged by UAL
- To delete data logged by UAL
- Managing UAL in high volume environments
- Recovering from a corrupt state
- Enable Work Folders usage license tracking
How do I log on as an administrator?
An administrator is someone who can make changes on a computer that will affect other users of the computer. Administrators can change security settings, install software and hardware, access all files on the computer, and make changes to other user accounts. To log on as an administrator, you need to have a user account on the computer with an Administrator account type.
If you are not sure if the account that you have on the computer is an administrator account, you can check the account type after you have logged on. The steps that you should follow will vary, depending on whether your computer is on a domain or a workgroup.
Type the user name and password for your account in the Welcome screen.
Open User Accounts by clicking the Start button , clicking Control Panel, clicking User Accounts, clicking User Accounts, and then clicking Manage User Accounts
. If you’re prompted for an administrator password or confirmation, type the password or provide confirmation.
Your user name is highlighted and your account type is shown in the Group column.
Type the user name and password for your account in the Welcome screen.
Open User Accounts by clicking the Start button , clicking Control Panel, clicking User Accounts and Family Safety, clicking User Accounts, and then clicking Manage another account
. If you’re prompted for an administrator password or confirmation, type the password or provide confirmation.
Your account type is displayed below your user name.
If your account type is Administrator, then you are currently logged on as an administrator.
If your account type is not Administrator, then you cannot log on as an administrator unless you know the user name password for another account on the computer that is an administrator. If you are not an administrator, you can ask an administrator to change your account type.
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.
Manage User Access Logging
Applies To: Windows Server (Semi-Annual Channel), Windows Server 2016, Windows Server 2012 R2, Windows Server 2012
This document describes how to manage User Access Logging (UAL).
UAL is a feature that can help server administrators quantify the number of unique client requests of roles and services on a local server.
UAL is installed and enabled by default and collects data on a nearly real-time basis. There are only a few configuration options for UAL. This document describes these options and their intended purpose.
To learn more about the benefits of UAL, see the Get Started with User Access Logging.
In this document
The configuration options covered in this document include:
Disabling and enabling the UAL service
Collecting and removing data
Deleting data logged by UAL
Managing UAL in high volume environments
Recovering from a corrupt state
Enable Work Folders usage license tracking
Disabling and enabling the UAL service
UAL is enabled and runs by default when a computer running Windows Server 2012, or later, is installed and started for the first time. Administrators may want to turn off and disable UAL to comply with privacy requirements or other operational needs. You can turn off UAL using the Services console, from the command line, or by using PowerShell cmdlets. However, to ensure that UAL does not run again the next time the computer is started, you also need to disable the service. The following procedures describes how to turn off and disable UAL.
You can use the Get-Service UALSVC PowerShell cmdlet to retrieve information about the UAL Service including whether it is running or stopped and whether it is enabled or disabled.
To stop and disable the UAL service by using the Services console
Sign in to the server with an account that has local administrator privileges.
In Server Manager, point to Tools, and then click Services.
Scroll down and select User Access Logging Service.Click Stop the service.
Right-click the service name and select Properties. On the General tab, change the Startup type to Disabled, and then click OK.
To stop and disable UAL from the command line
Sign in to the server with an account that has local administrator privileges.
Press the Windows logo + R, then type cmd to open a Command Prompt window.
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
Type net stop ualsvc, and then press ENTER.
Type netsh ualsvc set opmode mode=disable, and then press ENTER.
The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.
You can also stop and disable UAL by using the Stop-service and Disable-Ual Windows PowerShell commands.
If at a later date you want to restart and re-enable UAL you can do so with the following procedures.
To start and enable the UAL service by using the Services console
Sign in to the server an account that has local administrator privileges.
In Server Manager, point to Tools, and then click Services.
Scroll down and select User Access Logging Service.Click Start the service.
Right-click the service name and select Properties. On the General tab, change the Startup type to Automatic, and then click OK.
To start and enable UAL from the command line
Sign in to the server with local administrator credentials.
Press the Windows logo + R, then type cmd to open a Command Prompt window.
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
Type net start ualsvc, and then press ENTER.
Type netsh ualsvc set opmode mode=enable, and then press ENTER.
The following Windows PowerShell cmdlet or cmdlets perform the same function as the preceding procedure. Enter each cmdlet on a single line, even though they may appear word-wrapped across several lines here because of formatting constraints.
You can also start and reenable UAL by using the Start-service and Enable-Ual Windows PowerShell commands.
Collecting UAL data
In addition to the PowerShell cmdlets described in the previous section, 12 additional cmdlets can be used to collect UAL data:
Get-UalOverview: Provides UAL related details and history of installed products and roles.
Get-UalServerUser: Provides client user access data for the local or targeted server.
Get-UalServerDevice: Provides client device access data for the local or targeted server.
Get-UalUserAccess: Provides client user access data for each role or product installed on the local or targeted server.
Get-UalDeviceAccess: Provides client device access data for each role or product installed on the local or targeted server.
Get-UalDailyUserAccess: Provides client user access data for each day of the year.
Get-UalDailyDeviceAccess: Provides client device access data for each day of the year.
Get-UalDailyAccess: Provides both client device and user access data for each day of the year.
Get-UalHyperV: Provides virtual machine data relevant to the local or targeted server.
Get-UalDns: Provides DNS client specific data of the local or targeted DNS server.
Get-UalSystemId: Provides system specific data to uniquely identify the local or targeted server.
Get-UalSystemId is meant to provide a unique profile of a server for all other data from that server to be correlated with.В If a server experiences any change in the in one of the parameters of Get-UalSystemId a new profile is created.В Get-UalOverview is meant to provide the administrator with a list of roles installed and being used on the server.
Basic features of Print and Document Services and File Services are installed by default. Therefore administrators can expect to always see information on these displayed as if the full roles are installed.В Separate UAL cmdlets are included for Hyper-V and DNS because of the unique data that UAL collects for these server roles.
A typical use case scenario for UAL cmdlets would be for an administrator to query UAL for unique client accesses over the course of a date range.В This can be done in a variety of ways.В The following is a recommended method to query unique device accesses over a date range.
This will return a verbose listing of all unique client devices, by IP address, that have made requests of the server in that date range.
вЂActivityCount’ for each unique client is limited to 65,535 per day.В Also, calling into WMI from PowerShell is only required when you query by date.В All other UAL cmdlet parameters can be used within PS queries as expected, as in the following example:
UAL retains up to two years’ worth of history. To allow retrieval of UAL data by an administrator when the service is running, UAL makes a copy of the active database file, current.mdb, to a file named GUID.mdb every 24 hours for the WMI provider’s use.
On the first day of the year, UAL will create a new GUID.mdb. The old GUID.mdb is retained as an archive for the provider’s use. After two years, the original GUID.mdb will be overwritten.
The following procedure should be performed only by an advanced user and would commonly be used by a developer testing their own instrumentation of UAL application programming interfaces.
To adjust the default 24-hour interval to make data visible to the WMI provider
Sign in to the server with an account that has local administrator privileges.
Press the Windows logo + R, then type cmd to open a Command Prompt window.
Add the registry value: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\WMI\AutoLogger\Sum\PollingInterval (REG_DWORD).
Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on your computer.
The following example shows how to add a two-minute interval (not recommended as a long term running state): REG ADD HKLM\System\CurrentControlSet\Control\WMI\AutoLogger\Sum /v PollingInterval /t REG_DWORD /d 120000 /F
Time values are in milliseconds. The minimum value is 60 seconds, the maximum is seven days, and the default is 24 hours.
Use the Services console to stop and restart the User Access Logging Service.
Deleting data logged by UAL
UAL is not intended to be a mission critical component. Its design is intended to impact local system operations as little as possible while maintaining a high level of reliability. This also allows the administrator to manually delete UAL database and supporting files (every file in \Windows\System32\LogFiles\SUM\ directory) to meet operational needs.
To delete data logged by UAL
Stop the User Access Logging Service.
Open Windows Explorer.
Go to \Windows\System32\Logfiles\SUM\.
Delete all files in the folder.
Managing UAL in high volume environments
This section describes what an administrator can expect when UAL is used on a server with high client volume:
The maximum number of accesses that can be recorded with UAL is 65,535 per day.В UAL is not recommended for use on servers that are connected directly to the Internet, such as web servers that are connected directly to the Internet, or in scenarios where extremely high performance is the primary function of the server (such as in HPC workload environments). UAL is primarily intended for small, medium, and enterprise intranet scenarios where high volume is expected, but not as high as many deployment that serve Internet-facing traffic volume on a regular basis.
UAL in Memory: Because UAL uses the Extensible Storage Engine (ESE), UAL’s memory requirements will increase over time (or by quantity of client requests). But memory will be relinquished as the system requires it to minimize impact on system performance.
UAL on Disk: UAL’s hard disk requirements are approximately as shown below:
0 unique client records: 22M
50,000 unique client records: 80 M
500,000 unique client records: 384M
1,000,000 unique client records: 729M
Recovering from a corrupt state
This section discusses UAL’s use of the Extensible Storage Engine (ESE) at a high level and what an administrator can do if UAL data is corrupted or unrecoverable.
UAL uses ESE to optimize use of system resources and for its resistance to corruption. For more information about the benefits of ESE, see Extensible Storage Engine on MSDN.
Each time the UAL service starts ESE performs a soft recovery. For more information, see Extensible Storage Engine Files on MSDN.
If there is a problem with the soft recovery, ESE will perform a crash recovery. For more information, see JetInit Function on MSDN.
If UAL is still unable to start with the existing set of ESE files, it will delete all files in the \Windows\System32\LogFiles\SUM\ directory. After these files are deleted, the User Access Logging Service will restart and new files are created. The UAL service will then resume as if on a freshly installed computer.
The files in UAL database directory should never be moved or modified. Doing so will initiate the recovery steps, including the cleanup routine described in this section. If backups of the\Windows\System32\LogFiles\SUM\ directory are needed, then every file in this directory must be backed up together in order for a restore operation to function as expected.
Enable Work Folders usage license tracking
Work Folders server can use UAL to report client usage. Unlike UAL, Work Folder logging is not turned on by default. You can enable it with the following regkey change:
After the regkey is added, you must restart the SyncShareSvc service on the server, to enable logging.
After logging is enabled, 2 informational events get logged to the Windows Logs\Application channel each time a client connects to the server. For Work Folders, each user may have one or more client devices that connect to the server and check for data updates every 10 minutes. If the server is experiencing 1000 users, each with 2 devices the application logs will overwrite every 70 minutes, making troubleshooting unrelated issues difficult. To avoid this, you can disable the User Access Logging service temporarily, or increase the size of the server’s Windows Logs\Application channel.