Not sure if this is the right place for this question. I have written a windows forms powershell script and I have a function in the script that updates a richtextbox that I have in the form.
The function performs 3 actions. Each action takes approximately 30 seconds to complete. After each action, a new line is added to the ricktextbox.
The problem I am having is that the textbox only gets updated only once after the function completes. So at the end of the function and after a couple of minutes I see 3 lines.
What I was expecting was to see a line added to the textbox after each action is completed (every 30 seconds or so). I am adding the lines using $richtextbox.selectedtext = "<action name here>"
Anyone has any idea as to the reason behind this and how to correct it?