Set-SCDynamicOptimizationConfiguration

Configures dynamic optimization for a host group.

Syntax

Set-SCDynamicOptimizationConfiguration [-Aggressiveness <Byte>] [-Confirm]
 -DynamicOptimizationConfiguration <HostGroupDOSettings> [-EnablePowerOptimization <Boolean>]
 [-FrequencyMinutes <UInt32>] [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-VMMServer <ServerConnection>] [-WhatIf] [<CommonParameters>]
Set-SCDynamicOptimizationConfiguration [-AutomaticMode] [-Confirm]
 -DynamicOptimizationConfiguration <HostGroupDOSettings> [-JobVariable <String>] [-PROTipID <Guid>]
 [-RunAsynchronously] [-VMMServer <ServerConnection>] [-WhatIf] [<CommonParameters>]
Set-SCDynamicOptimizationConfiguration [-Confirm] -DynamicOptimizationConfiguration <HostGroupDOSettings>
 -Inherit <Boolean> [-JobVariable <String>] [-PROTipID <Guid>] [-RunAsynchronously]
 [-VMMServer <ServerConnection>] [-WhatIf] [<CommonParameters>]
Set-SCDynamicOptimizationConfiguration [-Confirm] -DynamicOptimizationConfiguration <HostGroupDOSettings>
 [-JobVariable <String>] [-ManualMode] [-PROTipID <Guid>] [-RunAsynchronously] [-VMMServer <ServerConnection>]
 [-WhatIf] [<CommonParameters>]

Description

The Set-SCDynamicOptimizationConfiguration cmdlet configures dynamic optimization for a host group.

Examples

Example 1: Enable automatic mode for a dynamic optimization configuration

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $DOConfig = Get-SCDynamicOptimizationConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCDynamicOptimizationConfiguration -DynamicOptimizationConfiguration $DOConfig -AutomaticMode

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

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

The last command enables automatic mode for the dynamic optimization configuration stored in $DOConfig.

Example 2: Enable power optimization for a host group

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $DOConfig = Get-SCDynamicOptimizationConfiguration -VMHostGroup $HostGroup 
PS C:\> Set-SCDynamicOptimizationConfiguration -DynamicOptimizationConfiguration $DOConfig -EnablePowerOptimization $True

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

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

The last command enables power optimization for the dynamic optimization configuration stored in $DOConfig.

Parameters

-Aggressiveness

Specifies the level of improvement required before migrating a virtual machine from one host to another in order to load balance virtual machines.

The higher the aggressiveness, the more resulting live migrations; the lower the aggressiveness, the fewer resulting live migrations. Valid values are: 1 through 5. The default value is 3 (Medium).

Type:Byte
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-AutomaticMode

Indicates that dynamic optimization automatically migrates virtual machines in order to load balance.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DynamicOptimizationConfiguration

Specifies a dynamic optimization configuration object.

Type:HostGroupDOSettings
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-EnablePowerOptimization

Enables power optimization when set to $True.

Type:Boolean
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-FrequencyMinutes

Specifies the frequency, in minutes, at which dynamic optimization will run when set to automatic mode.

Type:UInt32
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Inherit

Indicates whether settings are inherited from the parent host group.

Type:Boolean
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-JobVariable

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

Type:String
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ManualMode

Indicates that dynamic optimization will not run automatically.

Type:SwitchParameter
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PROTipID

Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.

Type:Guid
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.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Required:False
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

DynamicOptimizationConfiguration

This cmdlet returns a **DynamicOptimizationConfiguration** object.