-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Labels
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
Update-PSResource -verbose -scope AllUsers
In my case, Az.Network was upgraded from 7.19.1 to 7.20.0.
Az.Network has a dependency of Az.Accounts.
In the verbose log you can see that Az.Accounts 5.3.0 is installed as well, even though this version was already present.
Expected behavior
Only the modules that need an upgrade are upgraded
Actual behavior
Dependent modules are also upgraded, even if the new version is the same as the old version.
Error details
Update-PSResource -verbose -scope AllUsers
[...]
VERBOSE: Installed package Az.Accounts 5.3.0 is already up to date.
[...]
VERBOSE: Performing the operation "Update-PSResource" on target "Package to install: 'Az.Network', version: '7.20.0'".
VERBOSE: Performing the operation "Update-PSResource" on target "Package to install: 'Az.Accounts', version: '5.3.0'".
VERBOSE: Installation source path is: 'C:\Users\myuser\AppData\Local\Temp\952fc2c7-68a1-41f1-9a41-53ade187d4a5\az.accounts\5.3.0'
VERBOSE: Installation destination path is: 'C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.0'
VERBOSE: Temporary module version directory is: 'C:\Users\myuser\AppData\Local\Temp\952fc2c7-68a1-41f1-9a41-53ade187d4a5\az.accounts\5.3.0'
VERBOSE: Attempting to delete with restore on failure. 'C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.0'
VERBOSE: Attempting to move 'C:\Users\myuser\AppData\Local\Temp\952fc2c7-68a1-41f1-9a41-53ade187d4a5\az.accounts\5.3.0' to 'C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\5.3.0'
VERBOSE: Successfully installed package 'Az.Accounts' to location 'C:\Program Files\WindowsPowerShell\Modules'
VERBOSE: Installation source path is: 'C:\Users\myuser\AppData\Local\Temp\952fc2c7-68a1-41f1-9a41-53ade187d4a5\az.network\7.20.0'
VERBOSE: Installation destination path is: 'C:\Program Files\WindowsPowerShell\Modules\Az.Network\7.20.0'
VERBOSE: Temporary module version directory is: 'C:\Users\myuser\AppData\Local\Temp\952fc2c7-68a1-41f1-9a41-53ade187d4a5\az.network\7.20.0'
VERBOSE: Attempting to move 'C:\Users\myuser\AppData\Local\Temp\952fc2c7-68a1-41f1-9a41-53ade187d4a5\az.network\7.20.0' to 'C:\Program Files\WindowsPowerShell\Modules\Az.Network\7.20.0'
VERBOSE: Successfully installed package 'Az.Network' to location 'C:\Program Files\WindowsPowerShell\Modules'
[...]
Environment data
Get-Module microsoft.PowerShell.PSResourceGet -ListAvailable; $PSVersionTable | Format-Table
Directory: C:\program files\powershell\7\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 1.1.1 Microsoft.PowerShell.PSResourceGet Core,Desk {Compress-PSResource, Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository…}
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Binary 1.1.1 Microsoft.PowerShell.PSResourceGet Core,Desk {Compress-PSResource, Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository…}
Name Value
---- -----
PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response