A Skeleton of a Self-Updating Powershell Module using the Powershell Gallery.
This system is based on assuming the machine in question can connect to and download modules from the Powershell Gallery.
The module should be contained within a named folder, and the main module file and manifest files should be the same name
Replace the example.ps1 file with any .ps1 files you want to include in your module.
At this time, all functions within any .ps1 files are imported as part of the module.
You will need to also adjust your manifest file to include the new name of your main module file, and any metadata you want to include
Please follow best practices when adjusting the module manifest file
Once this module is installed on a machine, each time it is explicitly or implicitly imported, the first step of the module will attempt to update the module from the powershell gallery, and reload it before continuing the import
At this time, all functions within any .ps1 files are imported as part of the module.
This is somewhat contrary to the best practice of importing only public functions, or choosing functions manually.
This is a Work-In-Progress, but I am using it successfully in my environment.
As always, please feel free to bring up issues and I will try to address them!