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.
.ps1
.psm1
Import-Module
Which one is better and why?
2.1m questions
2.1m answers
60 comments
57.0k users