PowerCLI Reference

vSphere Auto Deploy Reference

Get-VMHostMatchingRules

Synopsis

Retrieves the list of rules in the rule set that match a specified host.

Syntax

Get-VMHostMatchingRules [-VMHost] <VMHost> [-DeployRuleSet <DeployRuleSet>] [<CommonParameters>]

Related Commands

Get-DeployRuleSet
New-DeployRule

Detailed Description

Retrieves the list of rules in the rule set that match a specified host. You can use this cmdlet to debug your working rule set before activating it.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMHostVMHostThe VMHost object to match against.truetrue (ByValue)
DeployRuleSetDeployRuleSetThe set of rules to match against a host.falsefalse

Return Type

VMware.DeployAutomation.Types.DeployRule[]

Notes

The DeployRule object has the following properties: Name System.String Pattern DeployRule.Pattern[] Items System.VIObject[]

Examples

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

C:\PS> Get-VMHostMatchingRules h1

Get the list of rules that match host "h1".

-------------- Example 2 --------------

C:\PS> Get-VMHostMatchingRules (Get-VMHost "h1")

Get the list of rules that match host "h1".


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