How to Run Windows Update from Command Line (CMD & PowerShell)
π
01 Jan 2025
π General
π 474 views
Method 1: Using Command Prompt (CMD)
-
Open Command Prompt with Administrator Privileges
- Press
Windows + S, type cmd, and right-click Command Prompt.
- Select Run as Administrator.
-
Check Windows Update Status
- Enter the following command:
- This triggers Windows to check for updates.
-
Download and Install Updates
- Use this command:
- It forces Windows to start downloading and installing available updates.
-
Restart After Updates (Optional)
- Restart your computer if updates require it:
Method 2: Using PowerShell
-
Open PowerShell with Administrator Privileges
- Press
Windows + S, type PowerShell, and right-click Windows PowerShell.
- Select Run as Administrator.
-
Install PowerShell Windows Update Module
- If not already installed, run:
-
Import the Windows Update Module
- Enter the following command:
-
Check for Updates
-
Install Updates
- Run this command to install updates:
- The
-AcceptAll parameter accepts all updates, and -AutoReboot reboots your system if needed.