Remove-DrsRule

Synopsis

Removes the specified DRS rules.

Syntax

Remove-DrsRule [-Rule] <DrsVMAffinityRule[]> [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Get-DrsRule
New-DrsRule
Set-DrsRule

Detailed Description

Removes the specified DRS rules.

Parameters

NameDescriptionRequired?Pipeline InputDefault Value
RuleSpecify the DRS rules you want to remove.truetrue (ByValue)
RunAsyncIndicate that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync" in the vSphere PowerCLI console.falsefalse
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicate that the cmdlet asks for confirmation before running.falsefalse

Input Type

Return Type

None

Notes

Examples

--------------  Example 1 --------------

C:\PS>$rules = Get-DrsRule -Cluster $cl -Name "*Rule1*" 

Remove-DrsRule $rules -Confirm:$false


Removes the DRS rules for the $cl clusters, whose names contain "Rule1".

Copyright © 1998 - 2009 VMware, Inc. All rights reserved.