Hey all, I'd like to use a batch file that will call up a Powershell Script in a folder of the same directory.
Example: %driveletter%\tools\scripts
Where the batch file is in the Tools folder, and the powershell scripts are in the Scripts folder. The files/scripts will be run from a USB drive, so hard-coding a drive letter is out of the question.
Currently my batch file uses the following command to run the script:
PowerShell.exe -NoProfile-Command"& {Start-Process PowerShell.exe -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dpn0.ps1""' -Verb RunAs}"
I'd like to modify this line so I can run the scripts in the nested folder, and also specify which ones I want to run (ex: script1.ps1, script2.ps1, etc)