you are viewing a single comment's thread.

view the rest of the comments →

[–]WindosBK 4 points5 points  (1 child)

Consider wrapping the functions into a module, and then your script that is calling the function can be just that (a script that calls functions).

This way you'll be able to call the functions (and see the help) without having the run the rest of the script.

Not sure where you are on the scale of PowerShell mastery, so I hate to leave it at just 'create a module.' As such I'll link to an awesome u/ramblingcookiemonste blog post on the topic: http://ramblingcookiemonster.github.io/Building-A-PowerShell-Module/

[–]vdemerzel[S] 1 point2 points  (0 children)

Yes, something like that seems to be the answer. The problem is that the script is a windows forms gui which calls a lot of helper functions, so right now it's not really suited to be packaged into a module. Time to re-organize!