This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Concerns using Update-Module causing multiple versions of the same module #213
Open
Description
I've been experiencing issues running script due to having multiple versions of the same module installed in my system.
I good example is with the AzureRM modules. Then, I just use the Update-Module cmdlet to update (is my understanding) AzureRM module from version 5.0.1 to the latest version 5.1.1
Expected Behavior
To see AzureRM module upgraded from version 5.0.1 to the latest version 5.1.1.
Current Behavior
It will create multiple AzureRM module: version 5.0.1 and 5.1.1
Possible Solution
Steps to Reproduce (for bugs)
- Make sure Azure Module version 5.0.1 is already installed.
- Proceed to execute Update-Module -Name AzureRM
Context
Having multiple versions of the same module has cause issue executing scripts having obsolete/deprecated cmdlets and/or invalid parameterset.
Your Environment
Windows 10 Insider Build 17046
> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.17046.1000
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17046.1000
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
> Get-Module
AzureRM
> Get-Module -ListAvailable PowerShellGet,PackageManagement
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.1.7.0 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-P...
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-P...
Script 1.5.0.0 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Modu...
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Modu...
> Get-PackageProvider
Name Version DynamicOptions
---- ------- --------------
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
NuGet 2.8.5.210 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag...
PowerShellGet 1.6.0.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, ...
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent
>Get-PackageProvider -ListAvailable
Name Version DynamicOptions
---- ------- --------------
msi 3.0.0.0 AdditionalArguments
msu 3.0.0.0
nuget 2.8.5.208
NuGet 2.8.5.210 Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterO...
PowerShellGet 1.5.0.0 PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherChe...
PowerShellGet 1.0.0.1
Programs 3.0.0.0 IncludeWindowsInstaller, IncludeSystemComponent
Sorry! During my cleanup update I ended up removing all versions
Below is a print screen of what was happening.