' This script was originally published in the Exchange Cookbook, ' (http://www.exchangebookcook.com). Written by Paul Robichaux, ' Missy Koslosky, and Devin Ganger. Redistributed with permission ' of the publisher, O'Reilly & Associates. ' This script toggles circular logging on the selected database. ' ------ SCRIPT CONFIGURATION ------ strServerName = "" ' e.g. "BATMAN" ' ------ END CONFIGURATION --------- Set theServer = CreateObject("CDOEXM.ExchangeServer") Set theSG = CreateObject("CDOEXM.StorageGroup") theServer.DataSource.Open strServerName ' Get the array list of StorageGroups, then coerce it to get the first ' SG name theSGArr = theServer.StorageGroups theFirstSG = theSGArr(0) strURL = "LDAP://" & theServer.DirectoryServer & "/" & theFirstSG theSG.DataSource.Open strURL If (True = theSG.CircularLogging) Then wscript.echo "Circular logging is enabled; disabling it" theSG.CircularLogging = false Else wscript.echo "Circular logging is disabled; enabling it" theSG.CircularLogging = true End If theSG.DataSource.Save WScript.echo "Circular logging set to " & theSG.CircularLogging & " for " & theFirstSG