Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Use the Start-Transcript and Stop-Transcript to create transcript of the script running as a job. Hopefully you'll see the issue more clearly i.e. Module not importing or similar.
The issue here is when you run the .bat file it will run using cmd which has a different interpreter than PowerShell, for example the method you've used to pass the array will not work in cmd and is why the statup.bat fails. For a simpler life, pick one, either cmd and bat or PowerShell and ps1.
I suspect 1.14.2281.0 is your Windows Terminal version. Could you run $PSVersionTable.PSVersion.ToString() so we can understand what version of PowerShell you're running and update the question with the output.
$args is an array of values for undeclared parameters that are passed to a function and you only passed declared parameters. I suggest you have a read of Get-Help about_functions and try the examples.