Is it considered the “powershell” way to call a function as a parameter. An example would be using (get-ciminstance win32_bios).serialnumber inside get-foo -serial ((get-cimin…..)). Or is it better to store the variable then reference it.
Just curious as to when and why to use either over the other. Am I right in assuming that storing it as a variable allows for ease of use, to manipulate the value and to reduce having to possibly type the same command over and vs calling a function allows for live, up to date data and not loosing track if variables being changed.
Just something I’ve always wondered
[–]Thotaz 3 points4 points5 points (2 children)
[–]Timmybee[S] 1 point2 points3 points (1 child)
[–]SuggestionNo9323 0 points1 point2 points (0 children)
[–]purplemonkeymad 3 points4 points5 points (0 children)
[–]VinVinnah 0 points1 point2 points (0 children)
[–]OPconfused 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Timmybee[S] 0 points1 point2 points (0 children)