How to Add a PowerShell GUI Event Handler add_click code example Example: button click event powershell $TestButton.Add_Click({ })