' This VBScript code enables logging of DIT whitespace information in the
event log.

' ---------------------------------------------------------------
' From the book "Active Directory Cookbook" by Robbie Allen
' Publisher: O'Reilly and Associates
' ISBN: 0-596-00466-4
' Book web site: http://rallenhome.com/books/adcookbook/code.html
' ---------------------------------------------------------------

' ------ SCRIPT CONFIGURATION ------
strDCName = "<DomainControllerName>"
' ------ END CONFIGURATION ---------

const HKLM = &H80000002
strNTDSReg = "SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics"
set objReg = GetObject("winmgmts:\\" & strDCName &
"\root\default:StdRegProv")
objReg.SetDWORDValue HKLM, strNTDSReg, "6 Garbage Collection", 1
WScript.Echo "Garbage Collection logging set to 1"





Michael Eubank


-----------------------------------------
"PLEASE NOTE: The preceding information may be confidential or privileged.
It only should be used or disseminated for the purpose of conducting
business with Parker. If you are not an intended recipient, please notify
the sender by replying to this message and then delete the information from
your system. Thank you for your cooperation."

List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to