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
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
Frenquently asked questions about everyday real problems in PowerShell
No comments:
Post a Comment