Bird
0
0

You want to update all installed modules from the PowerShell Gallery to their latest versions. Which command should you use?

hard📝 Application Q15 of 15
PowerShell - Modules and Script Organization
You want to update all installed modules from the PowerShell Gallery to their latest versions. Which command should you use?
AUpdate-Module
BInstall-Module -Force
CGet-Module -ListAvailable | Install-Module
DPublish-Module -Force
Step-by-Step Solution
Solution:
  1. Step 1: Identify the command to update modules

    Update-Module is the correct command to update installed modules to the latest version from the Gallery.
  2. Step 2: Evaluate other options

    Install-Module -Force installs or reinstalls but does not update all modules automatically. Get-Module -ListAvailable | Install-Module is incorrect syntax and inefficient. Publish-Module uploads modules, not updates them.
  3. Final Answer:

    Update-Module -> Option A
  4. Quick Check:

    Update all modules = Update-Module [OK]
Quick Trick: Use Update-Module to refresh all installed modules [OK]
Common Mistakes:
  • Using Install-Module to update all modules
  • Trying to pipe Get-Module to Install-Module incorrectly
  • Confusing Publish-Module with update

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes