Install and Manage Windows Updates with PowerShell (PSWindowsUpdate) [Guide]
Keeping Windows up to date is one of the easiest ways to protect your computer, fix bugs, and improve system stability. Usually, you can install updates through Windows Settings. However, if you want more control over the process, PowerShell gives you another way to check for, download, install, and manage Windows updates.
One popular tool for this job is PSWindowsUpdate, a PowerShell module that lets you manage Windows Update tasks through commands instead of clicking through multiple settings screens.
For example, you can use PSWindowsUpdate to check which updates are available, install selected updates, view update history, and find updates that may require a restart. It’s especially useful for advanced users, IT administrators, and anyone who wants to learn more about Windows management.
In this guide, we’ll walk through the process step by step, from opening PowerShell with administrator permissions to installing updates and checking their status.
Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)

PSWindowsUpdate is a PowerShell module that helps you manage Windows updates using commands. After installing the module, you can check for available updates with Get-WindowsUpdate, install updates with Install-WindowsUpdate, and review update history with Get-WUHistory.
You typically need an internet connection and an administrator PowerShell session to install the module and perform system-wide update operations. Some commands may also depend on your Windows version, PowerShell configuration, and update policies.
Before you begin, save your open work and make sure you have enough free storage space. If you’re managing a work computer, check with your IT administrator before changing update settings.
Step 1: Open PowerShell as an Administrator
First, open PowerShell with administrator permissions. These permissions are important because installing modules for all users and managing Windows updates can require elevated access.
Click the Start button and type PowerShell in the search box. Find Windows PowerShell in the results, right-click it, and select Run as administrator.
If Windows displays a User Account Control prompt, select Yes if you’re authorized to make changes to the computer.
A PowerShell window will open. You’ll see a command prompt where you can type commands. Unlike the regular Command Prompt, PowerShell supports commands called cmdlets, which are designed to manage Windows features and system tasks.
To check which version of PowerShell you’re using, enter the following command and press Enter:
$PSVersionTable.PSVersion
PowerShell displays version information. Windows PowerShell 5.1 is available on many Windows 10 and Windows 11 systems, although newer PowerShell versions can also be installed separately.
For a beginner, Windows PowerShell 5.1 is a practical starting point for this guide. Keep the administrator window open for the next step.
Step 2: Check Your PowerShell Execution Policy
PowerShell uses an execution policy to help control how scripts run. In some environments, the current policy may prevent a module’s scripts from running as expected.
To check the current policy, enter:
Get-ExecutionPolicy
Press Enter and review the result.
If the command returns Restricted, some scripts may be blocked. However, don’t immediately change the policy just to install PSWindowsUpdate. Module installation and script execution are related but separate operations, and the correct fix depends on the actual error.
If a policy change is genuinely needed and you’re allowed to make it, consider using a temporary setting for the current PowerShell session:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Read the prompt carefully before confirming. The Process scope applies only to the current PowerShell process and is reset when that session closes.
If your computer is managed by an organization, its policies may override your choice. In that case, contact your administrator instead of trying to bypass organizational restrictions.
Step 3: Install the PSWindowsUpdate Module
Now you’re ready to install PSWindowsUpdate. The module is available through the PowerShell Gallery, Microsoft’s repository for PowerShell modules and scripts.
In the same administrator PowerShell window, enter this command:
Install-Module -Name PSWindowsUpdate
Press Enter to run it.
If PowerShell asks whether you want to install the NuGet provider, follow the prompt to install it if required. You may also be asked whether you trust the PowerShell Gallery repository. Review the prompt before confirming.
If the module is already installed, PowerShell may tell you that no installation is necessary or offer additional options. If you encounter an error, read the message carefully instead of repeatedly running the same command.
Once the installation finishes, the module should be available for use. You can verify that it is installed by running:
Get-Module -Name PSWindowsUpdate -ListAvailable
PowerShell should display information about the module, including its version and installation location.
If you don’t have permission to install the module for all users, you can try installing it for your account instead:
Install-Module -Name PSWindowsUpdate -Scope CurrentUser
Use the appropriate installation scope for your situation. If your computer is managed by an organization, follow its software installation policies.
Step 4: Import the Module and Check Available Commands
Installing the module makes it available on your system, but importing it loads its commands into the current PowerShell session.
Enter the following command:
Import-Module PSWindowsUpdate
Press Enter and wait for PowerShell to finish.
Next, display the available commands by running:
Get-Command -Module PSWindowsUpdate
You’ll see the cmdlets provided by the module. Some of the most useful ones are Get-WindowsUpdate, Install-WindowsUpdate, Get-WUHistory, and Get-WURebootStatus.
Each command serves a different purpose. For example, Get-WindowsUpdate searches for applicable updates, while Get-WUHistory displays update installation history.
If PowerShell says the module cannot be found, return to Step 3 and verify that the installation completed successfully. You can also close and reopen PowerShell, then import the module again.
Step 5: Check for Available Windows Updates
Before installing anything, find out which updates are available for your computer.
Run this command:
Get-WindowsUpdate
Press Enter and let the command complete.
Depending on your system and update configuration, PowerShell may display update titles, KB numbers, sizes, and other available information. These details help you identify what Windows is offering.
If the command returns no updates, that doesn’t automatically mean something is wrong. Your computer may already be up to date, or the configured update service may not have any applicable updates available.
You can also check for updates through Microsoft Update, which may offer additional Microsoft software updates, depending on your configuration.
To register the Microsoft Update service if it isn’t already registered, use:
Add-WUServiceManager -MicrosoftUpdate
Review any prompts before confirming. Then run:
Get-WindowsUpdate -MicrosoftUpdate
This searches Microsoft Update rather than relying only on the default Windows Update source. Availability depends on your Windows version, installed products, and update policies.
Step 6: Download and Install Windows Updates
Once you’ve reviewed the available updates, you can install them using PSWindowsUpdate.
For a straightforward installation, run:
Install-WindowsUpdate
PowerShell will search for applicable updates and may prompt you to approve their installation. Review the displayed information before accepting.
If you want to accept all available updates without responding to individual confirmation prompts, use:
Install-WindowsUpdate -AcceptAll
Be careful when using -AcceptAll. It can approve updates you haven’t reviewed individually, so check the available updates first, especially on a work computer.
Some updates require a restart before installation is fully completed. Save your files and close your applications before allowing a restart.
Avoid adding automatic reboot options unless you understand their effect. For example, -AutoReboot can restart the computer automatically when required, potentially interrupting open applications or unsaved work.
After installation, check Windows Update in Settings or run the update search again to see whether additional updates remain available.
Step 7: Install a Specific Windows Update
Sometimes you may want to install one particular update instead of everything available. For example, you might need a specific cumulative update identified by its KB number.
First, search for available updates:
Get-WindowsUpdate
Find the update you want and note its KB number. Then use the -KBArticleID parameter to target that update.
For example, the following command searches for an update identified as KB5060000:
Get-WindowsUpdate -KBArticleID KB5060000
The KB number here is an example, not a recommendation to install that particular update. Replace it with the actual KB number relevant to your system.
After confirming that the update is available and appropriate for your computer, run:
Install-WindowsUpdate -KBArticleID KB5060000
Replace the example number with your target KB number before running the command.
Review any confirmation prompts and allow the installation to finish. If PowerShell reports that the update isn’t applicable, don’t try to force it. The package may be intended for another Windows version, already installed, or unavailable through the configured update source.
Step 8: View Windows Update History
After installing updates, it’s helpful to confirm what happened. PSWindowsUpdate includes a command for reviewing update history.
Run:
Get-WUHistory
PowerShell displays available historical update records, including information such as the update title, date, and result when provided by the system.
Review the output to see whether recent updates were installed successfully or whether an update may have failed.
You can also check Windows’ own update history by opening Settings > Windows Update > Update history in Windows 11. In Windows 10, open Settings > Update & Security > Windows Update > View update history.
If an update failed, note its KB number and error information. This gives you a starting point for troubleshooting instead of guessing which component is causing the issue.
Step 9: Check Whether Windows Needs a Restart
Some updates download and install successfully but don’t finish applying until you restart the computer. PSWindowsUpdate provides a command that checks the system’s reboot status.
Run:
Get-WURebootStatus
Review the output to see whether a restart is indicated.
If Windows needs a restart, save your work and close open applications. Then restart your computer through the Start menu > Power > Restart.
After Windows loads again, reopen PowerShell as an administrator, import the module if necessary, and run Get-WindowsUpdate to check for remaining updates.
Remember that reboot-status reporting can depend on the module version and system state. If you’re unsure whether an update completed, also review Windows Update history.
Step 10: Hide an Update You Don’t Want to Install
In certain situations, you may want to hide a specific update temporarily. For example, an optional driver update might cause a compatibility issue on your computer.
PSWindowsUpdate includes the Hide-WindowsUpdate command for hiding supported updates. First, identify the target update using Get-WindowsUpdate and note its KB number or exact title.
For example, you can inspect a particular update with:
Get-WindowsUpdate -KBArticleID KB5060000
After verifying that it is the update you intend to hide, use:
Hide-WindowsUpdate -KBArticleID KB5060000
Replace the example KB number with the correct one. Review any confirmation prompt before proceeding.
Hiding an update does not uninstall an update that is already installed, and it should not be treated as a way to permanently avoid important security patches. The command’s behavior and available options can vary with the installed module version.
If you later want to make the update available again, consult the command’s help by running:
Get-Help Hide-WindowsUpdate -Full
You can also check the installed module’s documentation for the supported unhide parameters.
FAQs
1. Is PSWindowsUpdate safe to use?
PSWindowsUpdate is a widely used community PowerShell module for managing Windows updates. Install it from the PowerShell Gallery, review its source and documentation, and use administrator privileges only when needed. As with any third-party module, review its commands before running them.
2. Can I use PSWindowsUpdate on Windows 10 and Windows 11?
PSWindowsUpdate can work on supported Windows 10 and Windows 11 configurations. However, available commands and update behavior may vary depending on the operating system, PowerShell version, module version, and organizational policies.
3. Do I need to open PowerShell as an administrator?
Administrator access is generally recommended when installing updates for the system or managing Windows Update services. Some read-only commands may work without elevation, but permissions depend on the operation.
4. Can PSWindowsUpdate automatically restart my computer?
Yes, certain installation options can trigger an automatic restart when required. However, automatic restarts can interrupt your work. Review the available updates and save your files before installing them.
5. What should I do if PSWindowsUpdate commands don’t work?
First, verify that the module is installed and imported. Run Get-Module -Name PSWindowsUpdate -ListAvailable and Get-Command -Module PSWindowsUpdate to check. If the problem continues, review the exact error message, PowerShell permissions, internet connectivity, and any update policies applied to your computer.
Summary
PSWindowsUpdate gives you another way to install and manage Windows updates without relying entirely on the Settings app. After opening PowerShell as an administrator, install the module, import it, and use commands such as Get-WindowsUpdate to check for updates and Install-WindowsUpdate to install them.
You can also install a specific update by its KB number, review update history, check whether a restart is needed, and hide selected updates when appropriate.
If you’re new to PowerShell, start with checking for updates and reviewing the results before installing anything.
