![]() PS1 The value of this parameter is used as the primary prompt string. As such, it isnt inherited by the non-interactive shell that executes your script. bashrc, which is sourced by every shell that would need PS1. In my example, I actually wanted only the batch at the first folder level and everything else "hidden from view" in a subfolder so the user does not have to think what file to execute. PS1 is typically not exported, since it is usually defined in. Therefore, I do not have to hardcode the script path in the batch file (you could put the PS1 at the same level than the batch file. In these two variants, the PS1 I am lauching is in a subfolder called data and script is called install.ps1. PowerShell -NoProfile -ExecutionPolicy Bypass -Command "
0 Comments
Leave a Reply. |