Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PowerSheel not workig in IntelliJ #76

Open
yadavaja opened this issue Feb 9, 2021 · 1 comment
Open

PowerSheel not workig in IntelliJ #76

yadavaja opened this issue Feb 9, 2021 · 1 comment

Comments

@yadavaja
Copy link

yadavaja commented Feb 9, 2021

Getting below error in Intellij but it works fine in Eclipse :

SEVERE: PowerShell not available
com.profesorfalken.jpowershell.PowerShellNotAvailableException: Cannot execute PowerShell. Please make sure that it is installed in your system. Errorcode:1

any pointers ?

@akozyreva
Copy link

Hi! You need to specify explicitly path to powershell, for example:

  try (PowerShell powerShell = PowerShell.openSession("C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" )) {
            PowerShellResponse  response = powerShell.executeCommand("Get-Process");
        } catch(PowerShellNotAvailableException ex) {
            System.out.println(ex);
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants