Reputation: 3868
Say I have a filter defined in a PowerShell module:
filter OddNumbers {
$value = $_
$value | ? {($_ % 2)}
}
First, is it possible to export this filter using Export-ModuleMember
? Second, if it is possible, what is the syntax?
Upvotes: 4
Views: 294
Reputation: 18176
Have you tried
Export-modulemember -function OddNumbers
A filter is a special kind of function so this should work.
Upvotes: 4