In Powershell, I have created a button and added a click event with $Button.Add_click($SomeScript)
I would like to be able to change what script is run. Something like $Button.Edit_click($SomeOtherScript)
If I do another Add_Click, it runs both scripts (which gives some interesting possibilities, but not what I want in this case). I am sure I could just update the “$SomeScript”, but that is not what I am looking for.
I can only find the Add_Event. Is there something to Clear_Event or Update_Event?