powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-VMQuestion



NAME
Set-VMQuestion

SYNOPSIS
Answers the specified virtual machine question.

SYNTAX
Set-VMQuestion -VMQuestion [-Option] [-WhatIf] [-Confirm] []

Set-VMQuestion -VMQuestion -DefaultOption [-WhatIf] [-Confirm] []


DESCRIPTION
Answers the specified virtual machine question using the value of the -Option parameter. If the -DefaultOption par
ameter is set to $true, the cmdlet answers the question with a default option, if any.


PARAMETERS
-VMQuestion
Specify the virtual machine question you want to answer.

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

-Option
Specify an object or string to provide an option to the virtual machine question. Wildcards are supported for s
tring values. The string can be used to specify an option ID or label. If the string does not match a valid opt
ion ID or label, or if there are multiple matches, an error is generated.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? true

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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

-DefaultOption
Indicate that you want to answer the virtual machine question using a default option. If no default option exis
ts for the question, an error is generated.

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


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
none


NOTES


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

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

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


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





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

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


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





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

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


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-VMQuestion.html
Get-VMQuestion