by stephengillie · 9y ago · 0 comments
This sounds like the opposite idea, remove the function instead of repairing it. Very aggressive idea.
> I would be interested in the technique you used to do this. specifically, how did you get your code to kick off and check on module load?
Powershell has great error-handling, and all errors are stored in the special $Error variable. For missing commas, semicolons, brackets, and other punctuation, the errors usually have the line-and-column of the missing item.
So the function would just parse $Error and update the module file with the right item at the right location.