< Back

Get-VMHostProfileRequiredInput

Sun Jan 19, 2020 6:56 pm

NAME Get-VMHostProfileRequiredInput



SYNOPSIS

This cmdlet performs a check whether the available information is sufficient to apply a host profile.





SYNTAX

Get-VMHostProfileRequiredInput [-VMHost] <VMHost> [[-Variable] <Hashtable>] [-Inapplicable] [-Profile

<VMHostProfile>] [-Server <VIServer[]>] [<CommonParameters>]





DESCRIPTION

This cmdlet 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

-Inapplicable [<SwitchParameter>]

Indicates that you want to view also the elements that are inapplicable to the operation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Profile <VMHostProfile>

Specifies a host profile to check if the provided information is sufficient for applying it to the specified

host.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Server <VIServer[]>

Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is passed to this

parameter, the command runs on the default servers. For more information about default servers, see the

description of Connect-VIServer.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-Variable <Hashtable>

Provides a hash table that contains the available values required for applying the specified profile to the

the specified host.



Required? false

Position? 2

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-VMHost <VMHost>

Specifies a host to check if the provided information is sufficient for applying the specified host profile.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more VMHostProfileInput objects







NOTES









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



Get-VMHost | Get-VMHostProfileRequiredInput



Retrieves required input for a list of hosts.

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



Get-VMHostProfileRequiredInput -VMHost $vmhost -Profile $vmhostProfile



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

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



$result = Get-VMHostProfileRequiredInput -VMHost $vmhost -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 $vmhost -Variable $requiredInputHashtable -Inapplicable;



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

$vmhost" }



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



RELATED LINKS

Online Version: https://code.vmware.com/doc/preview?id= ... Input.html