vSphere PowerCLI Reference

Get-VMHostProfileRequiredInput

Synopsis

Performs a check whether the available information is sufficient to apply a host profile.

Syntax

Get-VMHostProfileRequiredInput [-VMHost] <VMHost> [[-Variable] <Hashtable>] [-Profile <VMHostProfile>] [-Inapplicable] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

Performs a check whether the available information is sufficient to apply a host profile, and returns missing values. If the cmdlet returns no output, the information in the hashtable passed to the Variable parameter is sufficient to apply the host profile to the host by using the Apply-VMHostProfile cmdlet.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
VMHostVMHostSpecify a host to check if the provided information is sufficient for applying the specified host profile.truetrue (ByValue)
VariableHashtableProvide a hash table that contains the available values required for applying the specified profile to the the specified host.falsefalse
InapplicableSwitchParameterIndicate that you want to view also the elements that are inapplicable to the operation.falsefalse
ProfileVMHostProfileSpecify a host profile to check if the provided information is sufficient for applying it to the specified host.falsetrue (ByValue)
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

VMHostProfileInput

Notes

Examples

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

Get-VMHost | Get-VMHostProfileRequiredInput

Retrieves required input for a list of hosts.

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

Get-VMHostProfileRequiredInput -VMHost $host -Profile $hostProfile

Retrieves a required input by specifying a host and a profile.

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

$result = Get-VMHostProfileRequiredInput -VMHost $host -Variable $requiredInputHashtable;

if (-not $result) { Apply-VMHostProfile -Entity $vmhost -Variable $requiredInputHashtable}

Check whether the specified hashtable that contains values for each required input is exhaustive. If the result is null, then the hashtable can be used by Apply-VMHostProfile.

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

$result = Get-VMHostProfileRequiredInput -VMHost $host -Variable $requiredInputHashtable -Inapplicable;

$result | where { $_.Type -eq 'Inapplicable' } | foreach { Write-Host "Key $($_.Key) is not applicable for host $host" }

Retrieve the required and inapplicable input and display all inapplicable keys.


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