I am trying to set up a iOS Shortcut to hibernate a windows machine via SSH for windows, however I am having a bit of trouble getting the sequencing right.
The Hibernate command for windows I am using is "%windir%\System32\rundll32.exe powrprof.dll,SetSuspendState Hibernate" - this works fine, but the issue is it doesnt provide a response back to say it has successfully run, nor does it give enough time for the SSH session to disconnect gracefully, therefore it causes the iOS Shortcut to hang while running.
I used to solve this by using Pulseway, but they have since turned to rubbish the last year+ and the iOS automation options haven't worked since. They keep promising to fix them, but haven't done it.
Is there a better way to run this? Or a different command I can run that returns a response that I'm not aware of?
I was thinking maybe delay/powershell job might be the best option, which gives the SSH session enough time to execute the task then exit the shell.