Get Usage and Diagnostics Data Settings
The following example gets the current usage and diagnostics data settings.
- Connect to the administration web service.
- If usage and diagnostics data is misconfigured an exception will be thrown.
Code Sample
# Get diagnostics and usage data settings.
$settings = $administration.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)";