Check my answer on this post
Edit
Looks like that script was on Technet. Thank goodness for the internet archive!
Archived page
Direct link to ps1
https://web.archive.org/web/20200328155702/https://gallery.technet.microsoft.com/Import-ModuleExchange-010da141/file/134284/3/Import-ModuleExchange.ps1