I’m making a .bat-file run a powershell script, and I need to make sure the script does not ask for user input og anything as such may halt the clean running of the script.
So my question’s are:
- How do I set input of all kind disabled?
- Is there anything else I need to think about when running a powershell script remotely on a computer where the computers users shall have no interaction with the script what so ever?
Thanks
Have a good weekend! 🙂
Use the
-NonInteractiveswitch on PowerShell.exe. From the usage info:I’ve not used it myself so I can’t say how well it works. YMMV. 🙂