powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Test-DeployRuleSetCompliance



NAME
Test-DeployRuleSetCompliance

SYNOPSIS
Checks whether hosts are compliant with rules.

SYNTAX
Test-DeployRuleSetCompliance [-DeployRuleSet ] [-VMHost] []


DESCRIPTION
Checks whether the specified hosts are compliant with a specified rule set. If not rule set is specified, the curr
ently 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 profi
le 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 ho
st is in compliance with the rule set.


PARAMETERS
-DeployRuleSet
Rule set to use for checking compliance. The active rule set is used by default.

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

-VMHost
Host to check for compliance.

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


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
VMware.DeployAutomation.Types.TestResult[]


NOTES




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

C:\PS> Test-DeployRuleSetCompliance h1


Check the compliance of ESXi host "h1" against the active rule set.





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

C:\PS> Get-VMHost h1 | Test-DeployRuleSetCompliance


Check the compliance of ESXi host "h1" against the active rule set.






RELATED LINKS
Get-DeployRuleSet
Repair-DeployRuleSetCompliance