< Back

Set-VMQuestion

Sun Jan 19, 2020 7:12 pm

NAME Set-VMQuestion



SYNOPSIS

This cmdlet answers the specified virtual machine question.





SYNTAX

Set-VMQuestion -DefaultOption -VMQuestion <VMQuestion[]> [-Confirm] [-WhatIf] [<CommonParameters>]



Set-VMQuestion [-Option] <Object> -VMQuestion <VMQuestion[]> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

This cmdlet answers the specified virtual machine question using the value of the Option parameter. If the

DefaultOption parameter is set to $true, the cmdlet answers the question with a default option, if any.





PARAMETERS

-DefaultOption [<SwitchParameter>]

Indicates that you want to answer the virtual machine question using a default option. If no default option

exists for the question, an error is generated.



Required? true

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Option <Object>

Specifies an object or string to provide an option to the virtual machine question. Wildcards are supported

for string values. The string can be used to specify an option ID or label. If the string does not match a

valid option ID or label, or if there are multiple matches, an error is generated.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? true



-VMQuestion <VMQuestion[]>

Specifies the virtual machine question you want to answer.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false,

the cmdlet runs without asking for user confirmation.



Required? false

Position? named

Default value $true

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are

modified.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<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

The modified VMQuestion object







NOTES





You can also call this cmdlet via the Answer-VMQuestion alias.



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



Set-VMQuestion -VMQuestion $question -DefaultOption



Answers the question stored in the $question with a default option.

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



Set-VMQuestion -VMQuestion $question -Option "Cancel"



Answers the question stored in the $question variable with "cancel".

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



Get-VM VM | Get-VMQuestion | Set-VMQuestion -DefaultOption



Answers the question of VM virtual machine with a default option.



RELATED LINKS

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

Get-VMQuestion