Description
Summary of the new feature / enhancement
As a user I want to be able to update modules that are stored in my profile (or a network share) from multiple computers. Many places/companies are migrating to being able to back up my profile to OneDrive, so my modules in stored in c:\Users\{UserName}\Documents\WindowsPowerShell\Modules
(for Windows PowerShell) and c:\Users\{UserName}\Documents\PowerShell\Modules
(for PowerShell core) and this is great for documents, but not for modules.
If I install a module, let's use the Az module, on PC1 using Install-Module -Name Az
I can update the module with no issues on PC1, but let's say I also use a different machine called PC2. On PC2, I have access to these modules because they are in my profile made available via OneDrive, and there is no issue in using them. However, there is an issue when try to run Update-Module Az
we get the error "Module 'az' was not installed by using Install-Module, so it can't be updated", but the module was installed using Install-Module
, just on PC1.
Proposed technical implementation details (optional)
What I would like to see implemented in Install-Module is the ability to mark this module as being able to update from any location, regardless of where it was originally installed with the Install-Module cmdlet. An example of this might look something like this:
Install-Module -Name Az -Scope CurrentUser -AllowUniversalUpdates
The "AllowUniversalUpdates" would then mark the module as being able to be updated from any machine, as long as the user has write permissions to it. This would also work out to being able to host modules on a network share in addition to just a OneDrive location.