powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-DrsRule



NAME
Get-DrsRule

SYNOPSIS
Retrieves the list of DRS rules for the specified clusters.

SYNTAX
Get-DrsRule [[-Name] ] [-Cluster] [[-VM] ] [-Server ] [ arameters>]


DESCRIPTION
Retrieves the list of DRS rules for the specified clusters. Each rule defines the virtual machines that can run on
the same host (affinity rule) or must run on different hosts (anti-affinity).


PARAMETERS
-Name
Specify the name of the DRS rule you want to retrieve.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Cluster
Specify the clusters, for which you want to retrieve the DRS rules.

Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-VM
Specify virtual machines to filter the DRS rules that reference them. Passing values to this parameter through
a pipeline is deprecated and will be removed in a future release.

Required? false
Position? 3
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Server
Prompts you for confirmation before running the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DrsVMAffinityRule


NOTES




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

C:\PS>Get-DrsRule -Cluster $cluster -Name "*Rule1*"


Retrieves the DRS rules for the cluster stored in the $cluster variable, whose names contain 'Rule1".






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-DrsRule.html
New-DrsRule
Remove-DrsRule
Set-DrsRule