Guest User

Untitled

a guest
Jan 22nd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. # Find the VMs with questions
  2. $vms = get-view -viewtype virtualMachine | ?{ $_.runtime.question }
  3.  
  4. # Answer the questions
  5. foreach ($vm in $vms) {
  6. Get-VM $vm.name | Get-VMQuestion | Set-VMQuestion -DefaultOption
  7. }
  8.  
  9. # You could also do this, but Get-VMQuestion seems to be *very* slow:
  10. $questions = Get-VMQuestion
  11. foreach ($question in $questions) {
  12. Set-VMQuestion -VMQuestion $question -DefaultOption
  13. }
Add Comment
Please, Sign In to add comment