Multiple choice technology

Which of the below CmdLet will display a Pop Window in Powershell?

  1. $a = new-object -comobject wscript.Window $intAnswer = $a.popup("This is a Pop up?",0,"Select Option",3)
  2. $a = new-object -comobject wscript.shell $intAnswer = $a.Window("This is a Pop up?",0,"Select Option",4)
  3. $a = new-object -comobject wscript.shell $intAnswer = $a.popup("This is a Pop up?",0,"Select Option",4)
  4. $a = new-object -comobject wscript.shell $intAnswer = $a.Window("This is a Pop up?",0,"Select Option",5)
Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The correct code uses wscript.shell COM object and calls the popup method with the message text, timeout (0 seconds), title, and button type (4 = Yes/No). Options A uses wscript.Window (wrong object), B and D use .Window method instead of .popup. Option C has the correct COM object (wscript.shell) and correct method (popup).