Mike's PBX Cookbook

Win2008 Auto-Logon

The following will configure Automatic Logon for Windows Server 2008, Windows Vista and Windows 7. This can be desirable to automatically restart applications after a power failure, eg to start programs which don't run as services (such as PumpKIN).

1Open RegEdit, and drill-down to:

HKEY_LOCAL_MACHINE ➤ SOFTWARE ➤ Microsoft ➤ Windows NT ➤ CurrentVersion ➤ Winlogon

2Edit or create (type: String or REG_SZ) the DefaultUserName key. Set its value to the desired user name.

3Edit or create (type: String or REG_SZ) the DefaultPassword key. Set its value to the associated password.

Warning: The password is shown in clear-text. Consider whether this presents a security risk.

4Edit or create (type: String or REG_SZ) the DefaultDomainName key (this step only if required).

Set its value to the down-level domain name, not the FQDN. For example, specify MyDomain, not MyDomain.com or MyDomain.local. (Note: The DefaultDomainName key is distinct from the DomainName key which may also appear.)

5Edit or create (type: String or REG_SZ) the AutoAdminLogon key. Set its value to 1.

6Delete the AutoLogonCount key if it is present.

7Close RegEdit and restart the computer. It should automatically logon with the desired account.

8Make sure the relevant program shortcuts (eg, PumpKIN) are in the Startup folder.

To disable automatic logon, clear the value of the DefaultPassword key and set the value of the AutoAdminLogon key to 0.


Win Registry Editor


Clear All Windows 2008 R2 event logs:

If you want to clear the event logs in a Windows Server system, you can fire up Event Viewer, browse to the desired log, and from the Actions menu select Clear Log... Or, to clear all the System and Application logs at once, use the wevtutil command line utility.

A Windows PowerShell command like this will do the job: wevtutil el | foreach { wevtutil cl $_ }