Set-SCPlacementConfiguration

Sets the placement configuration settings for a host group.

Syntax

SetToInherit

Set-SCPlacementConfiguration
    -PlacementConfiguration <PlacementConfigurationSettings>
    -Inherit <Boolean>
    [-VMMServer <ServerConnection>]
    [-RunAsynchronously]
    [-PROTipID <Guid>]
    [-JobVariable <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

SetToOff

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

SetToFavor

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

SetToShouldMeet

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

SetToMustMeet

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.

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

-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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToOff
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToFavor
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToShouldMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToMustMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToFavor
Position:Named
Mandatory:True
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

SetToInherit
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

-LoadBalancerRequirement

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToOff
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToFavor
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToShouldMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToMustMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-MustMeet

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToMustMeet
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToOff
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToFavor
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToShouldMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToMustMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToOff
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PassthroughDiskRequirement

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToOff
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToFavor
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToShouldMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToMustMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PlacementConfiguration

Specifies a placement configuration object.

Parameter properties

Type:PlacementConfigurationSettings
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

-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

-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.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToShouldMeet
Position:Named
Mandatory:True
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

-VMQueueAvailability

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetToOff
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToFavor
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToShouldMeet
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
SetToMustMeet
Position:Named
Mandatory:False
Value from pipeline:False
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

PlacementConfiguration

This cmdlet returns a PlacementConfiguration object.