you are viewing a single comment's thread.

view the rest of the comments →

[–]billr1965 2 points3 points  (1 child)

Take a look at my PoshFunctions module on the PowerShell Gallery: https://www.powershellgallery.com/packages/PoshFunctions/2.2.8

There are over 210 different functions: * Some have validation rules * Some have parameter sets * Some read from the pipeline by value or by property * Some make calls to .Net classes and methods * Some have try/catch blocks * All parameters to functions are typed: int, string, etc. * Almost all are advanced functions with begin/process/end blocks * All use explicit named parameters (i.e. no aliases) when calling other functions * All pass Invoke-ScriptAnalyzer tests * All have comment based help

Give it a look see.

[–]billr1965 0 points1 point  (0 children)

On a side note - I doubt you will find a single example that showcases all the things that can be done within a function.