Skip to content

Commit 3424d30

Browse files
committed
Disable Windows Azure Diagnostics per default
1 parent 188e54f commit 3424d30

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/ResourceManager/Compute/Commands.Compute/Extension/AEM/SetAzureRmVMAEMExtension.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,16 @@ public class SetAzureRmVMAEMExtension : VirtualMachineExtensionBaseCmdlet
6161
Mandatory = false,
6262
Position = 2,
6363
ValueFromPipelineByPropertyName = false,
64-
HelpMessage = "If this parameter is provided, the commandlet will not enable Windows Azure Diagnostics for this virtual machine.")]
64+
HelpMessage = "Deprecated - Windows Azure Diagnostics is now disabled by default")]
6565
public SwitchParameter DisableWAD { get; set; }
6666

67+
[Parameter(
68+
Mandatory = false,
69+
Position = 2,
70+
ValueFromPipelineByPropertyName = false,
71+
HelpMessage = "If this parameter is provided, the commandlet will enable Windows Azure Diagnostics for this virtual machine.")]
72+
public SwitchParameter EnableWAD { get; set; }
73+
6774
[Parameter(
6875
Mandatory = false,
6976
Position = 3,
@@ -98,6 +105,11 @@ public override void ExecuteCmdlet()
98105

99106
ExecuteClientAction(() =>
100107
{
108+
if (this.DisableWAD)
109+
{
110+
this._Helper.WriteWarning("The parameter DisableWAD is deprecated. Windows Azure Diagnostics is disabled by default.");
111+
}
112+
101113
this._Helper.WriteVerbose("Retrieving VM...");
102114

103115
var selectedVM = ComputeClient.ComputeManagementClient.VirtualMachines.Get(this.ResourceGroupName, this.VMName);
@@ -278,7 +290,7 @@ public override void ExecuteCmdlet()
278290

279291
WriteVerbose("Chechking if WAD needs to be configured");
280292
// Enable VM Diagnostics
281-
if (!this.DisableWAD.IsPresent)
293+
if (this.EnableWAD.IsPresent)
282294
{
283295
this._Helper.WriteHost("[INFO] Enabling IaaSDiagnostics for VM {0}", selectedVM.Name);
284296
KeyValuePair wadstorage = null;

0 commit comments

Comments
 (0)