Remove-SCCustomPlacementRule

Deletes a custom placement rule from a placement configuration.

Description

The Remove-SCCustomPlacementRule cmdlet deletes a custom placement rule from a placement configuration for a host group.

For more information about Remove-SCCustomPlacementRule, type: "Get-Help Remove-SCCustomPlacementRule -online".

Parameters

CustomPropertyName

Required? true
Accept Pipeline Input? false
Position? named
Specifies the name for a custom property.

PlacementConfiguration

Required? true
Accept Pipeline Input? true (ByValue)
Position? named
Specifies a placement configuration object.

Confirm

Required? false
Accept Pipeline Input? false
Position? named
Prompts for confirmation before running the command.

JobVariable

Required? false
Accept Pipeline Input? false
Position? named
Specifies that job progress is tracked and stored in the variable named by this parameter. 

PROTipID

Required? false
Accept Pipeline Input? false
Position? named
Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

RunAsynchronously

Required? false
Accept Pipeline Input? false
Position? named
Indicates that the job runs asynchronously so that control returns to the command shell immediately. 

VMMServer

Required? false
Accept Pipeline Input? false
Position? named
Specifies a VMM server object.

Examples

1: Remove a custom palcement rule from a placment confiuguration.
PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup01"
PS C:\> $PlacementConfig = Get-SCPlacementConfiguration -VMHostGroup $HostGroup
PS C:\> $PlacementConfig | Remove-SCCustomPlacementRule -CustomPropertyName "Cost Center" -Confirm
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 places the object in the $PlacementConfig variable.

The last command uses the pipeline operator to pass the placement configuration stored in $PlacementConfig to the Remove-SCCustomPlacementRule cmdlet. Remove-SCCustomPlacementRule removes the custom placement rule named Cost Center from the placement configuration for HostGroup01 after prompting the user for confirmation.

See Also