diff --git a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs index de5d6722c92f..c20951370bdc 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/GetAzureRmDiagnosticSettingCommand.cs @@ -41,16 +41,6 @@ protected override void ProcessRecordInternal() { ServiceDiagnosticSettingsGetResponse result = this.InsightsManagementClient.ServiceDiagnosticSettingsOperations.GetAsync(this.ResourceId, CancellationToken.None).Result; - if (result.Properties != null && result.Properties.Logs != null && result.Properties.Logs.Count == 0) - { - result.Properties.Logs = null; - } - - if (result.Properties != null && result.Properties.Metrics != null && result.Properties.Metrics.Count == 0) - { - result.Properties.Metrics = null; - } - PSServiceDiagnosticSettings psResult = new PSServiceDiagnosticSettings(result.Properties); WriteObject(psResult); } diff --git a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs index fa96957a452a..9df19fd20168 100644 --- a/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs +++ b/src/ResourceManager/Insights/Commands.Insights/Diagnostics/SetAzureRmDiagnosticSettingCommand.cs @@ -171,16 +171,6 @@ protected override void ProcessRecordInternal() putParameters.Properties = properties; - if (properties != null && properties.Logs != null && properties.Logs.Count == 0) - { - properties.Logs = null; - } - - if (properties != null && properties.Metrics != null && properties.Metrics.Count == 0) - { - properties.Metrics = null; - } - this.InsightsManagementClient.ServiceDiagnosticSettingsOperations.PutAsync(this.ResourceId, putParameters, CancellationToken.None).Wait(); PSServiceDiagnosticSettings psResult = new PSServiceDiagnosticSettings(putParameters.Properties); WriteObject(psResult);