@@ -61,9 +61,16 @@ public class SetAzureRmVMAEMExtension : VirtualMachineExtensionBaseCmdlet
61
61
Mandatory = false ,
62
62
Position = 2 ,
63
63
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 " ) ]
65
65
public SwitchParameter DisableWAD { get ; set ; }
66
66
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
+
67
74
[ Parameter (
68
75
Mandatory = false ,
69
76
Position = 3 ,
@@ -98,6 +105,11 @@ public override void ExecuteCmdlet()
98
105
99
106
ExecuteClientAction ( ( ) =>
100
107
{
108
+ if ( this . DisableWAD )
109
+ {
110
+ this . _Helper . WriteWarning ( "The parameter DisableWAD is deprecated. Windows Azure Diagnostics is disabled by default." ) ;
111
+ }
112
+
101
113
this . _Helper . WriteVerbose ( "Retrieving VM..." ) ;
102
114
103
115
var selectedVM = ComputeClient . ComputeManagementClient . VirtualMachines . Get ( this . ResourceGroupName , this . VMName ) ;
@@ -278,7 +290,7 @@ public override void ExecuteCmdlet()
278
290
279
291
WriteVerbose ( "Chechking if WAD needs to be configured" ) ;
280
292
// Enable VM Diagnostics
281
- if ( ! this . DisableWAD . IsPresent )
293
+ if ( this . EnableWAD . IsPresent )
282
294
{
283
295
this . _Helper . WriteHost ( "[INFO] Enabling IaaSDiagnostics for VM {0}" , selectedVM . Name ) ;
284
296
KeyValuePair wadstorage = null ;
0 commit comments