I pushed in github tiny project which can be used to run process and setup timeout for him and for his child proccesses: https://github.com/burlachenkok/process_tool
It's a sources with Makefile, and it's not a powershell script. But hope it can be usefull for you.