I have been attempting to run powershell as my terminal on windows in pycharm, so I did the following:
Browse to the PowerShell executable, right-click, run as administrator.
From the prompt, use the same command you tried:
Set-ExecutionPolicy Unrestricted
Once that is done, close PowerShell, and attempt to use it again from your application.
Note: You can't set the execution policy from a script, as the default execution policy prevents you from running scripts. (even if it's the profile script - still a script)