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

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
VMHost | VMHost | The VMHost object to match against. | true | true (ByValue) |
DeployRuleSet | DeployRuleSet | The set of rules to match against a host. | false | false |

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.