jPowerShell
jPowerShell copied to clipboard
Simple Java API to interact with PowerShell console
Hello! I need to execute specific powershell command in Java as admin. It works fine, but doesn't return any output. This is my code: ``` static void runPowerShellScript(){ try (PowerShell...
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....
When the maxWait is increased, isLastCommandInError waits until this time is reached and returns the error status later.
I have the below code which executes a powershell command and prints the output. I want the output to be printed to the logs so that the user knows if...
https://github.com/profesorfalken/jPowerShell/blob/fe785459bca019e6d0dd2dda7cc7ee4074219592/src/main/java/com/profesorfalken/jpowershell/PowerShell.java#L407 The lib is not completely converted to work in linux. When closing the powershell there is still hardcoded the call to taskkill.exe, which triggers an exception.
Yeah, it is now 2020! :D
#6s PowerShellResponse powerShellResponse = PowerShell .executeSingleCommand("Get-CimInstance -ClassName Win32_Printer -Property Name|Select-Object -Property Name;"); #1s Process exec = Runtime.getRuntime() .exec("powershell.exe Get-CimInstance -ClassName Win32_Printer -Property Name|Select-Object -Property Name;"); #1s powershell> .... i try...
As a user of earlier versions of jpowershell, I've upgraded to 3.0.1, but cannot seem to get off the ground. When attempting to openSession(), at line 168 the `PowerShell.inialize` method...
Hi there, Commands like Get-Date, Get-Process, etc times out when executed using JPowerShell in PowerShell 7.x.x. The same work fine in version 6.x.x. Also this happens when PowerShell is running...
I tried Connect-ExchangeOnline and AD module commands like add user to AD group. But it fails with no response. Which user credential consider when executing Powershell script.Problems only in Windows...