I was wondering if is possible to call a variable for use in a PowerShell script using the command line.
For instance, I have a script that I would like to run tonight. I want to run it at two times using a different input file (csv) each time.
Can I call...
powershell.exe -command {$input = <csv path>} -file <script path>
and discretely call a variable for use in the script from outside of the script? Do I just need to make two copies of the script with the variable change included in the script itself? Is there a way to do this that I am missing?