Set-VMQuestion

Synopsis

Answers the specified virtual machine question.

Syntax

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

Related Commands

Get-VMQuestion

Detailed Description

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

NameDescriptionRequired?Pipeline InputDefault Value
VMQuestionSpecify the virtual machine question you want to answer.truetrue (ByValue)
OptionSpecify 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.truefalse
WhatIfIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse
ConfirmIndicate that the cmdlet asks for confirmation before running.falsefalse
DefaultOptionIndicate 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.truefalse

Input Type

Return Type

none

Notes

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

Examples

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

C:\PS>Set-VMQuestion -VMQuestion $myQ -DefaultOption


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




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

C:\PS>Set-VMQuestion -VMQuestion $myQ -Option "Cancel"


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




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

C:\PS>Get-VM myVM | Get-VMQuestion | Set-VMQuestion -DefaultOption


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

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