Skip to main content

Manually Updating Windows with PowerShell: A Quick Guide

·421 words·2 mins
Windows Powershell Update
UmmIt
Author
UmmIt
Loves to write about technology, and cybersecurity related topics :)
Table of Contents

Introduction
#

Even if you’ve removed the built-in Windows Update GUI, there’s still a way to keep your system up-to-date. PowerShell comes to the rescue, offering a robust module for manual Windows updates. This guide is tailored for scenarios where you’ve disabled the native Windows update mechanisms and need a controlled method to ensure your system stays current

Prerequisites
#

Before you begin, make sure you have PowerShell installed on your system. Most modern versions of Windows come with PowerShell pre-installed. Additionally, ensure you have the PSWindowsUpdate module installed. If you don’t have it yet, you can install it using the following command in PowerShell:

Install-Module -Name PSWindowsUpdate -Force -SkipPublisherCheck

Step 1: Checking Available Updates
#

You can start by checking for available updates on your system. Use the following command to view the available updates:

Get-WindowsUpdate

This command will display a list of available updates, allowing you to see what needs to be installed.

Step 2: Installing Updates
#

To install updates, you can use the Install-WindowsUpdate cmdlet. Here’s a basic command to install all available updates:

Install-WindowsUpdate -MicrosoftUpdate -AcceptAll

In this command, -MicrosoftUpdate ensures you’re getting updates from Microsoft, and -AcceptAll installs all available updates without prompting for confirmation.

Step 3: Controlling Reboots
#

Managing reboots after installing Windows updates is crucial to ensure a smooth and uninterrupted user experience. PowerShell provides options to control the reboot behavior according to your preferences.

Automatic Reboot (Default Behavior)
#

By default, Windows updates usually trigger an automatic reboot to apply the changes. If you want to retain this default behavior, you can use the following command:

Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot

Adding the -AutoReboot parameter ensures that your system will automatically restart after the updates are installed, eliminating the need for manual intervention.

Manual Reboot
#

However, there might be scenarios where you prefer to reboot your system at a more convenient time, especially if you are in the middle of important tasks. To prevent an immediate reboot after updates, you can use the -IgnoreReboot parameter:

Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot

Using -IgnoreReboot disables the automatic reboot, giving you the flexibility to manually restart your system when it’s convenient for you. This option allows you to complete your work or save your progress before applying the updates.

Conclusion
#

This quick guide should help some people who remove windows updates altogether or want to update windows using the command line. However, updating using powershell will be faster than updating using the built-in GUI.

Reference
#

Related

Microsoft Activation Scripts (MAS): A Safe way to Active your windows and office without 3rd-party unknown software
·305 words·2 mins
Windows MAS
Customize Windows 10/11: Enhance Speed and Efficiency with ReviOS
·734 words·4 mins
Windows ReviOS
Windows Terminal: A Guide to Installing Oh My Posh and Customize
··2410 words·12 mins
Windows Oh My Posh
Scoop: Empowering Your Windows Terminal with Essential Tools and a Package Manager
··1499 words·8 mins
Windows Scoop Package Manager
Comprehensive Guide to Installing Gentoo Linux with OpenRC
··7057 words·34 mins
Open-RC Gentoo Linux