Inheritance: Microsoft.Azure.Commands.Batch.Models.PoolOperationParameters
        public override void ExecuteCmdlet()
        {
            EnableAutoScaleParameters parameters = new EnableAutoScaleParameters(this.BatchContext, this.Id,
                pool: null, additionalBehaviors: this.AdditionalBehaviors)
            {
                AutoScaleFormula = this.AutoScaleFormula,
                AutoScaleEvaluationInterval = this.AutoScaleEvaluationInterval
            };

            BatchClient.EnableAutoScale(parameters);
        }
        /// <summary>
        /// Enables automatic scaling on the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the pool and autoscale parameters.</param>
        public void EnableAutoScale(EnableAutoScaleParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id;

            WriteVerbose(string.Format(Resources.EnableAutoScale, poolId, parameters.AutoScaleFormula));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;

            poolOperations.EnableAutoScale(poolId, parameters.AutoScaleFormula, parameters.AutoScaleEvaluationInterval,
                                           parameters.AdditionalBehaviors);
        }
        /// <summary>
        /// Enables automatic scaling on the specified pool.
        /// </summary>
        /// <param name="parameters">The parameters specifying the pool and autoscale parameters.</param>
        public void EnableAutoScale(EnableAutoScaleParameters parameters)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException("parameters");
            }

            string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id;

            WriteVerbose(string.Format(Resources.EnableAutoScale, poolId, parameters.AutoScaleFormula));
            PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations;
            poolOperations.EnableAutoScale(poolId, parameters.AutoScaleFormula, parameters.AutoScaleEvaluationInterval,
                parameters.AdditionalBehaviors);
        }
        public static void EnableAutoScale(BatchController controller, BatchAccountContext context, string poolId)
        {
            BatchClient client = new BatchClient(controller.BatchManagementClient, controller.ResourceManagementClient);

            string formula = "$TargetDedicated=2";
            EnableAutoScaleParameters parameters = new EnableAutoScaleParameters(context, poolId, null)
            {
                AutoScaleFormula = formula
            };
            client.EnableAutoScale(parameters);
        }