0

Question:

I want to add a stop time (like 10m) for the PowerShell code as blow, is there has someone who knows how to change the code:

Start-Process -FilePath "notepad" -Wait -WindowStyle Maximized

Backgroud:

I want to use the intune PowerShell Script to run the PowerShell at the devices, but there has a limitation that PowerShell scripts time out after 30 minutes.

Thanks in advance.

Arthur
  • 103
  • 11
  • 3
    Does this answer your question? [Powershell Start Process, Wait with Timeout, Kill and Get Exit Code](https://stackoverflow.com/questions/36933527/powershell-start-process-wait-with-timeout-kill-and-get-exit-code) – zett42 Mar 22 '21 at 08:53
  • @zett42 Thanks so much for your suggestion. I think it can be worked. By the way, can you let me what should I change the code to achieve the goal that I posted. I am sorry I am a beginner at Powershell. – Arthur Mar 23 '21 at 00:27

0 Answers0