Using Powershell as terminal in IntelliJ IDEA IDEs like PyCharm, PHPStorm or RubyMine

Games Brainiac picture Games Brainiac · Jan 6, 2014 · Viewed 33.1k times · Source

I have been attempting to run powershell as my terminal on windows in pycharm, so I did the following:

enter image description here

However, when I try this, it says that it cannot execute my scripts, and hence I get the following error: SecurityError and the Fully Qualified Id is : UnAuthorizedAccess.

This arises from the fact that pycharm's terminal cannot execute my Powershell_profile.ps1 profile file.

How can I successfully run Pycharm's terminal with Powershell?

What I have tried so far, is going into my main powershell directory as in %windir%/system32/WindowsPowerShell/1.0/profile.ps1, and then change it to include the following:

Set-ExecutionPolicy Unrestricted

However, this does not help, and I get the same error when I try to open of pycharm's terminal.

I have also tried to run pycharm as Admin, however this does not solve the problem either, and I get the same aforementioned error.

Answer

Halt picture Halt · May 23, 2017

I've replaced cmd.exe with powershell.exe in a simpler way and hope it can help. I'm using webstorm2017 and Win10 os.

1.Find the exact location of powershell.exe.In mine and I believe in most computers the location would be C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe.Copy the whole path into your clipboard.

2.In your IDE open File=>Setting=>Tools=>Terminal, and paste the path into "Shell path" blank.

3.Restart the IDE and everything would be ok.