public class Main {
    public static void main(String[] args) throws IOException {

        String[] command = {"powershell.exe","ipconfig /all;exit;"};
        ProcessBuilder processBuilder = new ProcessBuilder(command);
        Process startComand = processBuilder.start();
        System.out.println("*****************************************");

        BufferedReader bufer = new BufferedReader(new InputStreamReader(startComand.getInputStream(),"cp866"));

        String line = "";

        while ((line=bufer.readLine()) != null){
            System.out.println(line);
        }
        startComand.exitValue();
    }
}