Test-DeployRuleSetCompliance
Checks whether the specified hosts are compliant with a specified rule set. If not rule set is specified, the currently active rule set is used.For example, if a rule specifies a particular host profile should be attached to a host, and a different host profile is actually attached to that host, the host is out of compliance.The output of this cmdlet is a TestResult object that contains the VMHost object and a list containing the current item associated with the host and the expected item, according to the rules. If the list of items is empty, the host is in compliance with the rule set.
Syntax
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required
|
VMHost | VMHost[] | named |
|
Host to check for compliance. |
optional | DeployRuleSet | DeployRuleSet | named |
|
Rule set to use for checking compliance. The active rule set is used by default. |
optional | ProgressAction | ActionPreference | named |
|
Output
Examples
Example 1
Test-DeployRuleSetCompliance h1
Check the compliance of ESXi host "h1" against the active rule set.
Example 2
Get-VMHost h1 | Test-DeployRuleSetCompliance
Check the compliance of ESXi host "h1" against the active rule set.
Related Commands
DeployRule
Adds one or more rules to the rule set.
Clones an existing rule.
Gets a DeployRule object.
Creates a new rule.
Removes a rule from the working rule set.
Updates an existing rule.
DeployRuleSet
Gets the current working rule set or the current active rule set.
Sets the list of rules in the working rule set.
DeployRuleSetCompliance
Remediate any non-compliant associations discovered by Test-DeployRuleSetCompliance
Checks whether hosts are compliant with rules.