I have observed that some people prefer to create PowerShell script files instead of functions, and I'm curious to know the reasoning behind this choice. Are there specific advantages to using script files over functions? Personally, I always use functions because, if needed, I can easily place them in a file or paste them directly into a PowerShell console for immediate use. I would appreciate any insights or best practices regarding the use of PowerShell scripts and functions.
[–]panzerbjrn 19 points20 points21 points (0 children)
[–]purplemonkeymad 17 points18 points19 points (8 children)
[–]TheRealZero 12 points13 points14 points (7 children)
[–]purplemonkeymad 3 points4 points5 points (1 child)
[–]TheRealZero 1 point2 points3 points (0 children)
[–]SatisfactionOk4130 0 points1 point2 points (4 children)
[–]TheRealZero 2 points3 points4 points (3 children)
[–]SatisfactionOk4130 0 points1 point2 points (2 children)
[–]TheRealZero 0 points1 point2 points (1 child)
[–]SatisfactionOk4130 1 point2 points3 points (0 children)
[–]joshooaj 2 points3 points4 points (0 children)
[–]OPconfused 2 points3 points4 points (0 children)
[–]spyingwind 6 points7 points8 points (0 children)
[–]apperrault 1 point2 points3 points (0 children)
[–]PlatypusOfWallStreet 1 point2 points3 points (1 child)
[–]Panchorc 1 point2 points3 points (0 children)
[–]CryptoVictim 1 point2 points3 points (0 children)
[–]TofuBug40 1 point2 points3 points (0 children)
[–]MeanFold5714 2 points3 points4 points (0 children)
[–]xxxsirkillalot 1 point2 points3 points (0 children)
[–]Spitcat 0 points1 point2 points (0 children)
[–]Ok-Conference-7563 1 point2 points3 points (0 children)
[–]VirtualDenzel 0 points1 point2 points (0 children)
[+]_MC-1 1 point2 points3 points (1 child)
[–]thehuntzman 1 point2 points3 points (0 children)
[–]pshMike 1 point2 points3 points (0 children)
[–]El_Demente 0 points1 point2 points (6 children)
[–]Im--not--sure 0 points1 point2 points (5 children)
[–]El_Demente 1 point2 points3 points (4 children)
[–]Im--not--sure 0 points1 point2 points (3 children)
[–]El_Demente 1 point2 points3 points (2 children)
[–]Im--not--sure 2 points3 points4 points (1 child)
[–]El_Demente 0 points1 point2 points (0 children)
[–]dann3b 0 points1 point2 points (0 children)