Improved Powershell timeout handling.