powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-VMHostProfileRequiredInput



NAME
Get-VMHostProfileRequiredInput

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

SYNTAX
Get-VMHostProfileRequiredInput [-VMHost] [[-Variable] ] [-Profile ] [-Inapplicab
le] [-Server ] []


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


PARAMETERS
-VMHost
Specify a host to check if the provided information is sufficient for applying the specified host profile.

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

-Variable
Provide 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
Accept pipeline input? false
Accept wildcard characters? false

-Profile
Specify a host profile to check if the provided information is sufficient for applying it to the specified host
.

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

-Inapplicable
Indicate that you want to view also the elements that are inapplicable to the operation.

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? named
Default value
Accept pipeline input? false
Accept wildcard characters? true


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
VMHostProfileInput


NOTES




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

C:\PS>Get-VMHost | Get-VMHostProfileRequiredInput


Retrieves required input for a list of hosts.





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

C:\PS>Get-VMHostProfileRequiredInput -VMHost $host -Profile $hostProfile


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





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

C:\PS>$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 --------------

C:\PS>$result = Get-VMHostProfileRequiredInput -VMHost $host -Variable $requiredInputHashtable -Inapplicable;

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


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-VMHostProfileRequiredInput.ht
ml