Create PowerShell functions only for reusable code, not unnecessary script fragmentation. Avoid over-engineering small PowerShell scripts that become difficult to read and maintain. Keep PowerShell ...
Last month, I explored exit codes and how decent error correction in your shell scripts always should include testing the value of $? after each meaningful command ...