ScriptInstanceDST.Execute_CheckCircularLogging_diagnostic_script. (DataSourceModuleType)

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft_Exchange_2010_Execute_Diagnostic_Script Default

Source Code:

<DataSourceModuleType ID="ScriptInstanceDST.Execute_CheckCircularLogging_diagnostic_script." Accessibility="Public">
<Configuration/>
<ModuleImplementation>
<Composite>
<MemberModules>
<DataSource ID="DS" TypeID="Microsoft_Exchange_2010_Execute_Diagnostic_Script">
<IntervalSeconds>300</IntervalSeconds>
<SyncTime>00:00</SyncTime>
<TimeoutSeconds>120</TimeoutSeconds>
<ScriptName>CheckCircularLogging.ps1</ScriptName>
<Arguments/>
<ScriptBody><Script>
param(
[string]
[ValidateNotNullOrEmpty()]
[parameter(Mandatory=$true)]
$Database
)

# Success and failure event IDs
$EVENT_DATABASE_OK = 1000
$EVENT_DATABASE_NO_CIRCULAR_LOGGING = 1001

$exchangeInstallPath = (get-item -path env:ExchangeInstallPath).Value
$scriptPath = join-path $exchangeInstallPath "Scripts"
. $scriptPath\DiagnosticScriptCommonLibrary.ps1

if (! (Get-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction:SilentlyContinue) )
{
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
}

$ReplicationType = [Microsoft.Exchange.Data.Directory.SystemConfiguration.ReplicationType]

$dbObject = Get-MailboxDatabase $Database -ErrorAction:SilentlyContinue

if ($dbObject) {

if (($dbObject.ReplicationType -eq $ReplicationType::Remote) -and (-not $dbObject.CircularLoggingEnabled)) {
Add-MonitoringEvent -Id $EVENT_DATABASE_NO_CIRCULAR_LOGGING -Type $EVENT_TYPE_ERROR -Message $Database
} else {
Add-MonitoringEvent -Id $EVENT_DATABASE_OK -Type $EVENT_TYPE_INFORMATION -Message $Database
}

}
</Script></ScriptBody>
<MonitoringDataSource>MSExchange Monitoring CheckCircularLogging</MonitoringDataSource>
<MaxStartDelaySeconds>15</MaxStartDelaySeconds>
</DataSource>
</MemberModules>
<Composition>
<Node ID="DS"/>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>