powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Test-VMHostProfileCompliance



NAME
Test-VMHostProfileCompliance

SYNOPSIS
Tests hosts for profile compliance.

SYNTAX
Test-VMHostProfileCompliance [-VMHost] [-UseCache] [[-Server] ] []

Test-VMHostProfileCompliance [-Profile] [-UseCache] [[-Server] ] []


DESCRIPTION
Tests hosts for profile compliance. The Profile and VMHost parameters cannot be set at one and the same time. If th
e Profile parameter is set, the specified host profile is tested for compliance with the hosts, to which it is asso
ciated. If the VMHost parameter is specified, the host is tested for compliance with the profiles associated with i
t. If no profiles are associated to the host, then the profile associated with the cluster is applied.


PARAMETERS
-VMHost
Specify the host you want to test for profile compliance with the profile associated with it. If no profile is
associated with it, the host is tested for compliance with the profile associated with the cluster, to which th
e host belongs. Do not set this parameter if the Profile parameter is set.

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

-UseCache
Indicate that you want the vCenter Server to return cached information. If vCenter Server does not have cashed
information, a compliance scanning is performed.

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

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

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

-Profile
Specify a host profile against which to test the specified host for compliance with the host to which it is ass
ociated. Do not set this parameter if the VMHost parameter is set.

Required? false
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
VMHostProfileIncompliance


NOTES




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

C:\PS>Test-VMHostProfileCompliance -VMHost Host


Tests the specified host for compliance with the profiles associated with it.





-------------- Example 3 --------------

C:\PS>$profile = Get-VMHostProfile -Name Profile

Apply-VMHostProfile -AssociateOnly -Profile $profile -Entity 10.0.0.126

Test-VMHostProfileCompliance -VMHost 10.0.0.126 | fl *


Test the profile compliance of a non-compliant virtual machine host associated with the profile.





-------------- Example 4 --------------

C:\PS>Test-VMHostProfileCompliance -Profile $profile | fl *


Test the profile compliance of a virtual machine host profile with the hosts it is associated with.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Test-VMHostProfileCompliance.html
Apply-VMHostProfile
Export-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
New-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile