Undo AVG secured powershelll

Hi, I'm a programmer and I was writing a script that involved using powershell. The code was supposed to test an install that was already on my device, but instead of results, I got a popup saying that powershell had been secured:
the popup
Now I can't run any powershell commands from my code. Any help on undoing this and making sure it never happens again? Thanks