Simple Module Example
suggest changefunction Add {
[CmdletBinding()]
param (
[int] $x
, [int] $y
)
return $x + $y
}
Export-ModuleMember -Function Add
This is a simple PowerShell script module. Save it as MyCoolModule.psm1. A module manifest (.psd1) can point at that file. Export-ModuleMember chooses which functions callers can see. Leave internal functions out of that call.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents