I've published a stable release of the PSFunctionTools module to the PowerShell Gallery. Previously, it was pre-release. The module requires PowerShell 7.1 and later. Although, as I have mentioned in the past, you are welcome to fork the repository and create a version that will run on Windows PowerShell. I wanted to point out a few features that might interest you.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
First, I made it easy to get a list of commands in the module.
I've updated a number of the commands to work better in a pipelined expression. I've also written a new command that I know I will get a lot of use from, and maybe you will as well.
Get-FunctionProfile
Over the years, I've written several variations of this command, but I'm excited about the current iteration. The concept is to analyze a PowerShell function and create a profile. I would like to know what PowerShell commands will it run. Will it call external commands? Is it using aliases? Is it using any .NET code or invoking .NET methods? All of these questions help determine if the command is safe to run. Or, for my code, does the function meet my expectations?
The output is a summary object. I can see the defined alias, its commands, and other potentially helpful information. This is truly useful when coming across a function that may not be as complete as it could be.
If this were something I was working on, I would know I had some work to do. The function uses aliases and even has a few commands that PowerShell can't resolve. These could be undefined aliases or external commands. However, don't assume that the output indicates problems. It may be that one of the unresolved commands is a private function in a module. There's nothing wrong with that. And even the use of native .NET isn't always wrong. If the function needs to run on Linux, it may need to resort to these statements. I should also point out that the profile can't distinguish between the 'foreach' alias of ForEach-Object and the 'foreach' keyword. But this gives me enough information to know what I should look for when writing a PowerShell function.
A few last points about the output. The ParameterSets property will list detected parameter set names. The DynamicParameters property is a boolean value that indicates if dynamic parameters are defined.
I hope you'll try this command out and let me know what you think.