The following example gets the current usage and diagnostics data settings.



Code Sample

# Get diagnostics and usage data settings.

$settings = $core.GET_UsageDiagnosticsDataSettings();


# Write enabled setting.

Write-Host "Enabled: $($settings.Enabled)";

if (!$settings.Enabled) { return ;}


# If enabled, write all settings.

Write-Host "To Addresses: $($settings.ToAddresses)";

Write-Host "CC Addresses: $($settings.CcAddresses)";

Write-Host "Information Level: $($settings.InformationLevel)";

Write-Host "Schedule: $($settings.Schedule.Summary)";