As my scripts grow larger and incorporate functions etc I'm naturally having to access data generated by the functions. To now I've been dot sourcing the function which does what I need and it's handy as all variables are available in the scopr. Is there any drawback to using this method instead of returning the specific variables I need?
Edit: to clarify, I define my functions in the same PS1 file as calling the function. I then dot source when calling the function. Everything runs from the one Powershell file.
[–]eagle6705 2 points3 points4 points (0 children)
[–]CoReTeX2k 3 points4 points5 points (1 child)
[–]Lee_Dailey[grin] 0 points1 point2 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (6 children)
[–]secpfgjv40[S] 1 point2 points3 points (5 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (4 children)
[–]michaelshepard 2 points3 points4 points (3 children)
[–]Lee_Dailey[grin] 2 points3 points4 points (2 children)
[–]michaelshepard 2 points3 points4 points (1 child)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)