PowerShell: Using .bat file
The one thing I always loved about .bat files is that you can just double click them.
So I use them to run my scripts for actions I use often.
This .bat file opens a exectution prompt and starts a powershell script with the parameter
Because of the
-noexit parameter it will not close the window once it is done. This is usefull if you have a script that generates output or if you want to read any error messages.
@powershell -noexit -command ".\Add-Flavor.ps1 -Test"
You can just copy/paste this code into notepad, “Save As” giberish.bat and execute.