0

I wrote a Powershell script, and I call some functions from external scripts using Dot sourcing. The scripts I try to call are not detected after making the main script executable. Do I have to compile the scripts to be called as well?

6
  • Include the scripts in the main script and compile the whole thing Commented Feb 28, 2022 at 15:37
  • How should i do? Writing everything in one file? Commented Feb 28, 2022 at 16:11
  • Yep, I guess that's the best way.. Commented Feb 28, 2022 at 17:24
  • Perhaps this answer helps. Commented Feb 28, 2022 at 20:44
  • I merged everything into one file. The solution proposed in the link of mklement0 is interesting, but in my case I don't have to execute scripts in sequence, and I need to pass parameters to the functions. Thanks a lot to everyone. Commented Mar 1, 2022 at 21:17

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.