Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Find the VMs with questions
- $vms = get-view -viewtype virtualMachine | ?{ $_.runtime.question }
- # Answer the questions
- foreach ($vm in $vms) {
- Get-VM $vm.name | Get-VMQuestion | Set-VMQuestion -DefaultOption
- }
- # You could also do this, but Get-VMQuestion seems to be *very* slow:
- $questions = Get-VMQuestion
- foreach ($question in $questions) {
- Set-VMQuestion -VMQuestion $question -DefaultOption
- }
Add Comment
Please, Sign In to add comment