Set-SCPlacementConfiguration

Sets the placement configuration settings for a host group.

Syntax

Set-SCPlacementConfiguration
   -PlacementConfiguration <PlacementConfigurationSettings>
   -Inherit <Boolean>
   [-VMMServer <ServerConnection>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SCPlacementConfiguration
   -PlacementConfiguration <PlacementConfigurationSettings>
   [-Off]
   [-DVDDriveRequirement]
   [-LoadBalancerRequirement]
   [-NetworkRequirement]
   [-PassthroughDiskRequirement]
   [-VMQueueAvailability]
   [-VMMServer <ServerConnection>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SCPlacementConfiguration
   -PlacementConfiguration <PlacementConfigurationSettings>
   [-Favor]
   [-DVDDriveRequirement]
   [-LoadBalancerRequirement]
   [-NetworkRequirement]
   [-PassthroughDiskRequirement]
   [-VMQueueAvailability]
   [-VMMServer <ServerConnection>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SCPlacementConfiguration
   -PlacementConfiguration <PlacementConfigurationSettings>
   [-ShouldMeet]
   [-DVDDriveRequirement]
   [-LoadBalancerRequirement]
   [-NetworkRequirement]
   [-PassthroughDiskRequirement]
   [-VMQueueAvailability]
   [-VMMServer <ServerConnection>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-SCPlacementConfiguration
   -PlacementConfiguration <PlacementConfigurationSettings>
   [-MustMeet]
   [-DVDDriveRequirement]
   [-LoadBalancerRequirement]
   [-NetworkRequirement]
   [-PassthroughDiskRequirement]
   [-VMQueueAvailability]
   [-VMMServer <ServerConnection>]
   [-RunAsynchronously]
   [-PROTipID <Guid>]
   [-JobVariable <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-SCPlacementConfiguration cmdlet sets the placement configuration settings for a host group. To update settings for a host group, that host group must not be inheriting its settings from a parent host group.

Examples

Example 1: Set the placement settings which must be met by a host group

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $PlacementConfig = Get-SCPlacementConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCPlacementConfiguration -PlacementConfiguration $PlacementConfig -MustMeet -ClusterReserveRequirement -HighAvailabilityRequirement -IPAddressAvailabilityRequirement

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

The second command gets the placement configuration object for the host group stored in $HostGroup and stores the object in the $PlacementConfig variable.

The last command updates the settings for the placement configuration stored in $PlacementConfig.

Example 2: Reset the placement settings for a host group to inherit from the parent host group

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $PlacementConfig = Get-SCPlacementConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCPlacementConfiguration -PlacementConfiguration $PlacementConfig -Inherit $True

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

The second command gets the placement configuration object for the host group stored in $HostGroup and stores the object in the $PlacementConfig variable.

The last command sets the placement configuration stored in $PlacementConfig to inherit its placement settings from its parent host group.

Example 3: Turn off placement settings for a host group

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $PlacementConfig = Get-SCPlacementConfiguration -VMHostGroup $HostGroup
PS C:\> Set-SCPlacementConfiguration -PlacementConfiguration $PlacementConfig -Off -ClusterReserveRequirement -HighAvailabilityRequirement -IPAddressAvailabilityRequirement

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

The second command gets the placement configuration object for the host group stored in $HostGroup and stores the object in the $PlacementConfig variable.

The last command turns off the specified placement settings for the placement configuration stored in $PlacementConfig.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DVDDriveRequirement

Indicates that the destination host must have the number of physical DVD drives required by a virtual machine for placement. If a specific DVD drive letter has been configured on the virtual machine, the host must have a DVD drive that uses that same drive letter.

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

-Favor

Indicates that the placement process will select a host even if the host does not meet all requirements; no warning message is displayed to the user.

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

-Inherit

Indicates whether settings are inherited from the parent host group.

Type:Boolean
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-LoadBalancerRequirement

Indicates that the destination host must have access to a load balancer for placement.

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

-MustMeet

Indicates that the placement process will not select a host if the host does not meet the requirements.

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

-NetworkRequirement

Indicates that the destination host must have virtual switches that connect to each of the logical networks required by a virtual machine for placement.

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

-Off

Indicates that a placement check is turned off, therefore placement will not consider that metric when determining whether the destination host meets placement metrics.

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

-PassthroughDiskRequirement

Indicates that a destination host must support passthrough disks for placement.

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

-PlacementConfiguration

Specifies a placement configuration object.

Type:PlacementConfigurationSettings
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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
Position:Named
Default value:None
Required:False
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ShouldMeet

Indicates that the placement process will select a host even if the host does not meet all requirements; a warning message is displayed to the user.

Type:SwitchParameter
Position:Named
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

-VMQueueAvailability

Indicates that a destination host must support network optimizations for placement.

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

-WhatIf

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

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

Outputs

PlacementConfiguration

This cmdlet returns a PlacementConfiguration object.