This question and this blog post address how to pass particular parameters into a PowerShell script from a batch file.
How can one pass all parameters into the PowerShell script? Basically I want to splat all the parameters so that the batch file passes all arguments through transparently.
Edit for more context:
I'm currently using a line like:
PowerShell.exe -Command "& '%~dpn0.ps1' '%1' '%2'"
This works, but creates a redundancy between the files such that, if I update the PowerShell script to take different arguments, I have to update the batch script as well. What would be nice is if I could do something like:
PowerShell.exe -Command "& '%~dpn0.ps1' '%*'"