How can I get the effect of running a powershell script from a batch command.
e.g. I have a few batch commands on PATH specific to my user, I use these to make using the command line & git easier for my job.
However I havn't gotten into the habit of learning PowerShell yet, so don't like using PowerShell if I can help it.
However as stuff migrates, more and more scripts appear to be powershell scripts.
How can I create a 'shortcut' batch file, that forwards all arguments passed to it, to a powershell script of the same name?
E.g. I have a Powershell script called stree.ps1
Start-Process "C:\Users\ryan.leach\AppData\Local\SourceTree\SourceTree.exe" -ArgumentList "-f $((Resolve-Path $args[0]).toString())"
that will launch SourceTree with the argument corresponding to a passed in path.
How can I create a stree.bat that calls stree.ps1 forwarding all arguments to stree.ps1, without having to update stree.bat if small changes are made to stree.ps1?