DekGenius.com
[ Team LiB ] Previous Section Next Section

Recipe 15.1 Enabling Extended dcpromo Logging

15.1.1 Problem

You want to enable extended dcpromo logging. This can be useful if you are experiencing problems during the promotion or demotion process and the dcpromo log files are not providing enough information to indicate the problem.

15.1.2 Solution

These solutions are slightly different on Windows 2000. See the Discussion section for more information. To enable the maximum amount of logging, use 16711683 (FF0003 in hexadecimal) as the flag value. For a complete description of the possible bit values, see MS KB 221254.

15.1.2.1 Using a graphical user interface
  1. Run regedit.exe from the command line or Start Run.

  2. In the left pane, expand HKEY_LOCAL_MACHINE Software Microsoft Windows CurrentVersion AdminDebug dcpromoui.

  3. If the LogFlags value does not exist, right-click on dcpromoui in the left pane and select New DWORD Value. For the name, enter LogFlags.

  4. In the right pane, double-click on the LogFlags value and enter the flag value you want to set.

  5. Click OK.

15.1.2.2 Using a command-line interface

With the following command, <FlagValue> needs to the decimal version (not hexidecimal) of the flag value:

> reg add HKLM\Software\Microsoft\Windows\CurrentVersion\AdminDebug\dcpromoui /v[RETURN] 
"LogFlags" /t REG_DWORD /d <FlagValue>
15.1.2.3 Using VBScript
' This code sets the dcpromoui logging flag (for Windows Server 2003 only)
' ------ SCRIPT CONFIGURATION ------
strDC   = "<DomainControllerName>"  ' e.g. dc01
intFlag = <FlagValue>               ' Flag value in decimal, e.g. 16711683
' ------ END CONFIGURATION ---------

const HKLM = &H80000002
strDcpromoReg = "Software\Microsoft\Windows\CurrentVersion\AdminDebug\dcpromoui"
set objReg = GetObject("winmgmts:\\" & strDC & "\root\default:StdRegProv")
objReg.SetDwordValue HKLM, strDcpromoReg, "LogFlags", intFlag
WScript.Echo "Dcpromoui flag set to " & intFlag

15.1.3 Discussion

As described in Recipe 3.5, the dcpromo wizard creates a couple of log files in %SystemRoot%\debug when it is executed, which can be useful in troubleshooting promotion or demotion problems. Typically, the default amount of logging that is done in the dcpromoui.log file is sufficient to identify most problems, but you can increase it as described in the Solution section.

The location of the log flags registry value changed from Windows 2000 to Windows Server 2003. In Windows 2000, the value is located here:

HKLM\Software\Microsoft\Windows\CurrentVersion\AdminDebug\dcpromoui

In Windows Server 2003, the value is located here (which was used in the Solutions section):

HKLM\Software\Microsoft\Windows\CurrentVersion\AdminDebug\dcpromoui\LogFlags

15.1.4 See Also

Recipe 3.5 for more on troubleshooting dcpromo problems, and MS KB 221254 (Registry Settings for Event Detail in the Dcpromoui.log File)

    [ Team LiB ] Previous Section Next Section