Set-SCPlacementConfiguration

Applies To: System Center 2012 - Virtual Machine Manager

Set-SCPlacementConfiguration

Sets the placement configuration settings for a host group.

Syntax

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

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

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

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

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

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

For more information about Set-SCPlacementConfiguration, type: "Get-Help Set-SCPlacementConfiguration -online".

Parameters

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Inherit<Boolean>

Indicates whether settings are inherited from the parent host group.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-JobVariable<String>

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-LoadBalancerRequirement

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-MustMeet

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

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PassthroughDiskRequirement

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PlacementConfiguration<PlacementConfigurationSettings>

Specifies a placement configuration object.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PROTipID<Guid>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

Aliases

none

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.

Aliases

none

Required?

false

Position?

named

Default Value

none

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-VMQueueAvailability

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

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • PlacementConfiguration

Examples

1: Set the placement settings which must be met by 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 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.

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

2: Reset the placement settings for a host group to inherit from the parent 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 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.

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

3: Turn off placement settings 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 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.

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

Get-SCPlacementConfiguration

Get-SCVMHostGroup