![pass Keystroke to powershell in background, started with -w hidden](https://linux22.com/image/1673770/pass%20Keystroke%20to%20powershell%20in%20background%2C%20started%20with%20-w%20hidden.png)
I am trying to learn powershell scripting and I have the following problem:
A script needs to get a ENTER keystroke during its runtime so the first lines are executed before the 2nd part starts. The script is started with "powershell -w hidden script.ps1" so it is running in background with no window visible.
How can I achieve that? I did not find an answer that I can understand. Is it possible to write a keystroke in the script somehow?