You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Christian Seidlitz edited this page Nov 14, 2022
·
4 revisions
I have got a pretty nice solution to the "Export-ModuleMember" problem which my OCD often faces.
Problem is, that the declaration of a function is separated from the "Export-ModuleMember" command, which makes a module harder to maintain, as you have to check the functions you export on every rename or addition/removal.
A soltion is to 'invent' an attribute in your psm1 file:
classInternalAttribute : System.Attribute {}
then apply it to every param block of the functions which you want to keep internal