Java: aguarde o processo exec até sair

Estou executando um programa java no Windows que coleta log de eventos do Windows. Um arquivo .csv é criado no qual determinadas operações devem ser executadas.

Os comandos são executados e canalizados. Como posso fazer com que meu programa Java aguarde até que o processo seja concluído?

Aqui está o trecho de código que estou usando:

Runtime commandPrompt = Runtime.getRuntime();
try {           
    Process powershell = commandPrompt.exec("powershell -Command \"get-winevent -FilterHashTable @{ logname = 'Microsoft-Windows-PrintService/Operational';StartTime = '"+givenDate+" 12:00:01 AM'; EndTime = '"+beforeDay+" 23:59:59 ';  ID = 307 ;} | ConvertTo-csv| Out-file "+ file +"\"");
//I have tried waitFor() here but that does not seem to work, required command is executed but is still blocked
} catch (IOException e) { }
// Remaining code should get executed only after above is completed.

questionAnswers(3)

yourAnswerToTheQuestion