Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

Pseudo-Verb for functions created with Export-ModuleMember

$
0
0
Unfortunately functions you create right in PowerShell rather than in a compiled .Net language seem not to have 'Verb'-Properties. In order to find non approved verbs in this kind of self made modules a simple "pseudo verb" function might do as well:function PseudoVerb{ param ($fn_name) try { $parts = $fn_name -split "-" return $parts[0] } catch { return "[no verb]" } } Now change the respective line in Example 5 like this:$myVerbs = get-command -modu

Viewing all articles
Browse latest Browse all 12198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>