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
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.
Example 3: Enable automatic mode for a storage dynamic optimization configuration
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 storage 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).
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
FromValues
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AutomaticMode
Indicates that compute dynamic optimization automatically migrates virtual machines in order to load balance.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ToAutomatic
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-AutomaticModeForDisk
Indicates that storage dynamic optimization automatically migrates virtual hard disks in order to load balance storage.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DiskAggressiveness
Specifies the level of improvement required before migrating a virtual hard disk (vhd) from one shared storage (CSV or file share) to another in order to load balance VHDs.
The higher the aggressiveness, the more VHD migrations; the lower the aggressiveness, the fewer resulting migrations. Valid values are: 1 through 5. The default value is 3 (Medium).
Parameter properties
Type:
Byte
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-DynamicOptimizationConfiguration
Specifies a dynamic optimization configuration object.
Parameter properties
Type:
HostGroupDOSettings
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-EnablePowerOptimization
Enables power optimization when set to $True.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
FromValues
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-FrequencyMinutes
Specifies the frequency, in minutes, at which dynamic optimization will run when set to automatic mode.
Parameter properties
Type:
UInt32
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
FromValues
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Inherit
Indicates whether settings are inherited from the parent host group.
Parameter properties
Type:
Boolean
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ToInherit
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ManualMode
Indicates that dynamic optimization will not run automatically.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ManualModeForDisk
Indicates that storage dynamic optimization will not run automatically.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
ToManualForDisk
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
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.
Parameter properties
Type:
Guid
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-VMMServer
Specifies a VMM server object.
Parameter properties
Type:
ServerConnection
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type:
SwitchParameter
Default value:
False
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.
Outputs
DynamicOptimizationConfiguration
This cmdlet returns a DynamicOptimizationConfiguration object.