Most of the time this is caused by the script doing something that is considered interactive.
Try adding a transcript to your script (Start-Transcript, Stop-Transcript).
This might give some clues.
You can also add some Write-Host line in the script, just to make sure how far it goes till it becomes unresponsive.