次の方法で共有


Start-SCDynamicOptimization

Starts dynamic optimization on a host cluster or host group.

Syntax

Start-SCDynamicOptimization
     [-VMMServer <ServerConnection>]
     [-VMHostGroup] <HostGroup>
     [-OptimizationObjectType <ManualOptimizationObjectType>]
     [-WhatIf]
     [<CommonParameters>]
Start-SCDynamicOptimization
     [-VMMServer <ServerConnection>]
     [-VMHostCluster] <HostCluster>
     [-OptimizationObjectType <ManualOptimizationObjectType>]
     [-WhatIf]
     [<CommonParameters>]

Description

The Start-SCDynamicOptimization cmdlet manually starts the dynamic optimization process for a host cluster or host group.

Examples

Example 1: Optimize hosts in a cluster for compute

PS C:\> $Cluster = Get-SCVMHostCluster "Cluster01"
PS C:\> Start-SCDynamicOptimization -VMHostCluster $Cluster -OptimizationObjectType VM

The first command gets the host cluster object named Cluster01 and stores the object in the $Cluster variable.

The second command initiates the compute dynamic optimization process for the cluster stored in $Cluster.

Example 2: Optimize storage and compute in a cluster

PS C:\> $Cluster = Get-SCVMHostCluster "Cluster01"
PS C:\> Start-SCDynamicOptimization -VMHostCluster $Cluster -OptimizationObjectType All

The first command gets the host cluster object named Cluster01 and stores the object in the $Cluster variable.

The second command initiates the compute and storage dynamic optimization process for the cluster stored in $Cluster.

Example 3: Optimize hosts in a host group for compute and storage

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> Start-SCDynamicOptimization -VMHostGroup $HostGroup -OptimizationObjectType All

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

The second command initiates the compute and storage dynamic optimization process for the host group stored in $HostGroup.

Parameters

-OptimizationObjectType

Specifies the type of Dynamic optimization to start. It can be compute dynamic optimization (DO), storage DO or both.

Type:ManualOptimizationObjectType
Accepted values:VM, Disk, All, None
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-VMHostCluster

Specifies a Virtual Machine Manager (VMM) host cluster object.

Type:HostCluster
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMHostGroup

Specifies a virtual machine host group object or an array of host group objects.

Type:HostGroup
Position:0
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-VMMServer

Specifies a VMM server object.

Type:ServerConnection
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

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

Outputs

DynamicOptimizationResults

This cmdlet returns a DynamicOptimizationResults object.