public override void ExecuteCmdlet() { if (ResourceGroupName == null) { ResourceGroupName = GetResourceGroupByAccountName(Name); } var monitoringParams = new ClusterMonitoringRequest { WorkspaceId = WorkspaceId, PrimaryKey = PrimaryKey }; if (ShouldProcess("Enable Monitoring")) { HDInsightManagementClient.EnableMonitoring(ResourceGroupName, Name, monitoringParams); WriteObject(true); } }