2

I would like to run powershell with a hidden window.

I use this script but the window still appear:

powershell.exe -ExecutionPolicy ByPass -WindowStyle Hidden -NonInteractive -NoLogo -File "C:\test.ps1"

How can I modify the code to run powershell without window?

0

1 Answer 1

1

Try

Start-Process powershell -WindowStyle Hidden

You can use the ArgumentList parameter to pass the other parameters like '-File "C:\test.ps1"'

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.