This mostly comes down to how you're executing the PowerShell script itself. If you're running it within the ISE, it'll show the notification but the script shuts down and isn't available to catch the click event. I wrote a small script that might help point you in the right direction.
In short, I create a function that shows the notification, dot-source the script that has the function, then call the function from the console or another file as needed and it does what's expected.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This mostly comes down to how you're executing the PowerShell script itself. If you're running it within the ISE, it'll show the notification but the script shuts down and isn't available to catch the click event. I wrote a small script that might help point you in the right direction.
In short, I create a function that shows the notification, dot-source the script that has the function, then call the function from the console or another file as needed and it does what's expected.