If I want to separate out some of my functionality from my main PowerShell script, I can either write that as a .ps1
file and dot source the same or I can create that as a .psm1
and import the same using Import-Module
.
Which one is better and why?
question from:https://stackoverflow.com/questions/14882332/powershell-import-module-vs-dot-sourcing