Add-SCPowerOptimizationRange

Add-SCPowerOptimizationRange

Adds a time range to the power optimization schedule in a dynamic optimization configuration.

Syntax

Parameter Set: FromDOSettings
Add-SCPowerOptimizationRange -BeginHour <Int32> -DynamicOptimizationConfiguration <HostGroupDOSettings> -EndHour <Int32> -WeeklyScheduleDayOfWeek <Int32> [-JobVariable <String> ] [-PROTipID <Guid]> ] [-RunAsynchronously] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Add-SCPowerOptimizationRange cmdlet adds a time range to the power optimization schedule in the dynamic optimization configuration. Power optimization is implemented only during the time ranges that have been added. Otherwise, hosts associated with the dynamic optimization configuration are turned on.

Parameters

-BeginHour<Int32>

Specifies the hour of the day that power optimization begins.

Example format to begin power optimization at 3 AM: -BeginHour 3

Example format to begin power optimization at 5 PM: -BeginHour 17

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DynamicOptimizationConfiguration<HostGroupDOSettings>

Specifies a dynamic optimization configuration object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-EndHour<Int32>

Specifies the hour of the day that power optimization ends.

Example format to end power optimization at 8 AM: -EndHour 7

Example format to end power optimization at 3 PM: -EndHour 14

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WeeklyScheduleDayOfWeek<Int32>

Specifies one or more days of the week to run a job. If you specify this parameter, you must specify the StartTimeOfDay parameter. The default value is the current day of the week. Valid values to specify an individual day by using a string: Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday. Valid values to specify a set of days in a week: Any set of two or more days separated by commas. Valid values to specify an individual day by using an integer: 1, 2, 3, 4, 5, 6, 7.

Example format: -WeeklyScheduleDayOfWeek "Monday"

Example format: -WeeklyScheduleDayOfWeek "Monday, Wednesday, Friday"

Example format: -WeeklyScheduleDayOfWeek 5 (to specify a Friday)

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • PowerOptimizationSchedule

Examples

Example Example 1: Add a time range for power optmizationoptimization to a dynamic optimization configuration.optimization

The first command gets the host group object named HostGroup01, and then stores the object in the $HostGroup variable.

The second command gets the dynamic optimization configuration object for the host group stored in $HostGroup, and then stores the object in the $DOConfig variable.

The last command adds a time range to the dynamic optimization configuration stored in $DOConfig.

PS C:\> $HostGroup = Get-SCVMHostGroup -Name "HostGroup01"
PS C:\> $DOConfig = Get-SCDynamicOptimizationConfiguration -VMHostGroup $HostGroup
PS C:\> Add-SCPowerOptimizationRange -DynamicOptimizationConfiguration $DOConfig -BeginHour 19 -EndHour 23 -WeeklyScheduleDayOfWeek 0

Get-SCDynamicOptimizationConfiguration

Get-SCPowerOptimizationRange

Get-SCVMHostGroup