April 20, 2010

How do I call a script within a script?

Normally when you call a script it launch in a new scope. The trick is to use “dot sourcing”, this will force the script to launch in the same scope.

So in your script you can :

. .\Myfunctions-Library.ps1

No comments:

Post a Comment