I want wo start powershell window from java application with a command. Cmd is blocked by our company policy.
I've tried
new ProcessBuilder("powershell.exe", "start \"servicemix\" powershell -noexit -command \"dir\"").start();
However it does not open new window. The only way i've managed to open powershell window was with
Desktop.getDesktop().open(new File("full/path/to/powershell"));
But i haven't figured out a way how can i automatically run command in that window.
OS: windows