/// <summary> /// Changes the operating system version of the specified pool. /// </summary> /// <param name="parameters">The parameters specifying the pool and target OS version.</param> public void ChangeOSVersion(ChangeOSVersionParameters parameters) { if (parameters == null) { throw new ArgumentNullException("parameters"); } string poolId = parameters.Pool == null ? parameters.PoolId : parameters.Pool.Id; WriteVerbose(string.Format(Resources.ChangeOSVersion, poolId, parameters.TargetOSVersion)); PoolOperations poolOperations = parameters.Context.BatchOMClient.PoolOperations; poolOperations.ChangeOSVersion(poolId, parameters.TargetOSVersion, parameters.AdditionalBehaviors); }
public override void ExecuteCmdlet() { ChangeOSVersionParameters parameters = new ChangeOSVersionParameters(this.BatchContext, this.Id, null, this.TargetOSVersion, this.AdditionalBehaviors); BatchClient.ChangeOSVersion(parameters); }
protected override void ProcessRecord() { ChangeOSVersionParameters parameters = new ChangeOSVersionParameters(this.BatchContext, this.Id, null, this.TargetOSVersion, this.AdditionalBehaviors); BatchClient.ChangeOSVersion(parameters); }