'Three buttons powershell pop-up

I'm trying to create a very simply powershell pop-up with three buttons.

The first two buttons execute a different function each and the third once allows the user to cancel and exit.

So it would look like this :

| Button1 | Button2 | Exit |

I'm a noob and all I can do is a yes/no question with this :

$wshell = New-Object -ComObject Wscript.Shell
  $answer = $wshell.Popup("Blahblahblah",0,"My title",64+4)

if ($answer -eq 7){


Solution 1:[1]

You can use WPF with visual studio 2019, and create a popup like you want. And next take the xml for your code.

Example of utilisation of WPF : https://akril.net/creer-une-interface-graphique-wpf-en-powershell/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 gmngeager35