Get-WindowsUpdate Not Recognized: 7 Proven Fixes for PowerShell

Fix 'get windowsupdate is not recognized' error in PowerShell. Install PSWindowsUpdate module, adjust execution policy, and run Windows Update commands in minutes.

You open PowerShell, type Get-WindowsUpdate, and instead of a list of available patches, you get a red error message: "The term 'Get-WindowsUpdate' is not recognized as the name of a cmdlet, function, script file, or operable program."

I've seen this exact error countless times in my years managing Windows environments. Here's the good news: this isn't a broken Windows Update service. It's not a corrupted system file either. It's simply a missing or unloaded PowerShell module called PSWindowsUpdate. And in most cases, you can fix it in under five minutes.

This guide walks you through every root cause and proven fix for the "get windowsupdate is not recognized" error, covering Windows 10, Windows 11, and Windows Server environments.


Close-up of HTML and PHP code on screen showing error message and login form data.

Why Is 'WindowsUpdate Is Not Recognized as a Cmdlet'?

Before we dive into fixes, it helps to understand why this happens. The error message itself is misleading—it suggests something is wrong with your system, but the reality is much simpler.

The PSWindowsUpdate Module Is Not Installed

Here's the key fact: Get-WindowsUpdate is not a native PowerShell cmdlet. It belongs to a third-party module called PSWindowsUpdate, created by Michal Gajda. Microsoft doesn't include this module by default in Windows 10, Windows 11, or Windows Server.

Think of it this way: native cmdlets like Get-Service or Get-Process are built into PowerShell itself. They're always available. But Get-WindowsUpdate is more like an app you need to install before you can use it.

Command TypeExamplesAvailability
Native cmdletsGet-Service, Get-Process, Get-ItemAlways available
Module-based cmdletsGet-WindowsUpdate, Install-WindowsUpdateRequires PSWindowsUpdate module
If you haven't installed the module, PowerShell simply doesn't know what Get-WindowsUpdate means. That's the most common cause of this error.

PowerShell Execution Policy Blocks the Module

Even after installing the module, you might still see the error. In my experience, the second most common culprit is the PowerShell execution policy.

Windows ships with a default execution policy of Restricted on most client versions. This policy prevents any scripts or modules from loading, even ones you've installed yourself. If your policy is set to Restricted or AllSigned, PowerShell will refuse to load the PSWindowsUpdate module, and you'll get the "not recognized" error.

You can check your current policy with:

Get-ExecutionPolicy

If it returns Restricted, that's your problem.

PowerShell Module Path Is Misconfigured

Here's a scenario I've encountered more times than I'd like: the module is installed, the execution policy is fine, but the error persists. The issue? The module is installed in a location that PowerShell isn't searching.

PowerShell looks for modules in specific directories defined by the $env:PSModulePath environment variable. If you installed the module for a single user but are running an elevated (administrator) session, or vice versa, PowerShell might not find it.

There's also a common conflict between PowerShell 5.1 (which uses C:\Program Files\WindowsPowerShell\Modules) and PowerShell 7.x (which uses C:\Program Files\PowerShell\Modules). If you're running PowerShell 7 but installed the module for 5.1, you'll hit this wall.


Simple and minimalist image showcasing the word 'ERROR' on a white background.

How to Install the PSWindowsUpdate Module (Step-by-Step)

Now that you understand the root causes, let's fix them. Here are three methods to install the module, starting with the recommended approach.

Method 1: Install from PowerShell Gallery (Recommended)

The easiest way to get the PSWindowsUpdate module is directly from the PowerShell Gallery. Open PowerShell as administrator and run:

Install-Module -Name PSWindowsUpdate -Force

The -Force parameter bypasses the confirmation prompts and installs the latest version without asking. If you're prompted about installing from an untrusted repository, type Y to confirm.

Once the installation completes, verify it worked:

Get-Module -ListAvailable PSWindowsUpdate

You should see output similar to:

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                ExportedCommands
---------- -------    ----                ----------------
Script     2.2.0.2    PSWindowsUpdate     {Get-WUInstall, Get-WUUninstall, Get-WUApiSetting, Get-WUAVersion...}

If you see this, the module is installed and ready to use.

Method 2: Manual Download and Import

For offline environments or machines with restricted internet access, you'll need to install the module manually. This is a common requirement in air-gapped networks or heavily regulated industries.

  1. Download the module from the PowerShell Gallery website on a machine with internet access.
  2. Extract the downloaded folder.
  3. Copy the PSWindowsUpdate folder to C:\Program Files\WindowsPowerShell\Modules (for all users) or C:\Users\<YourUsername>\Documents\WindowsPowerShell\Modules (for current user only).
  4. Open PowerShell and import the module:
Import-Module PSWindowsUpdate

The directory structure should look like this:

C:\Program Files\WindowsPowerShell\Modules\
└── PSWindowsUpdate\
    ├── PSWindowsUpdate.psd1
    ├── PSWindowsUpdate.psm1
    └── ...

Method 3: Verify Installation and Check Module Path

If you've installed the module but still get the error, it's time to verify the installation and check your module path.

First, confirm the module is recognized:

Get-Module -ListAvailable PSWindowsUpdate

If this returns nothing, the module isn't in a location PowerShell is searching. Check your module path:

$env:PSModulePath

Typical output looks like:

C:\Users\YourUsername\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\System32\WindowsPowerShell\v1.0\Modules

If your module folder isn't in one of these paths, you have two options: move the module folder to a listed path, or add your custom path to the environment variable (more on this in the advanced section).


Fix 'Get-WindowsUpdate Is Not Recognized' After Installation

Installing the module is only half the battle. Here's how to fix the error when it persists after installation.

Run PowerShell as Administrator

This might seem obvious, but you'd be surprised how often it's the issue. Many cmdlets in the PSWindowsUpdate module require elevated privileges to function. Without admin rights, the module might load, but commands will fail with access denied errors.

To run PowerShell as administrator:

  1. Click the Start button.
  2. Type PowerShell.
  3. Right-click Windows PowerShell and select Run as administrator.
  4. Click Yes on the UAC prompt.

I've lost count of how many times I've debugged an issue for 20 minutes, only to realize I wasn't running an elevated session. Make this your first check.

Set the Correct PowerShell Execution Policy

If your execution policy is blocking the module, you need to change it. The recommended setting for most environments is RemoteSigned, which allows local scripts to run but requires downloaded scripts to be signed by a trusted publisher.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

You'll see a confirmation prompt:

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might affect
the security features described in the About_Execution_Policies help topic. Do you want to change the execution policy?
[Y] Yes  [N] No  [S] Suspend  [Help] (default is "Y"):

Type Y and press Enter.

The difference between RemoteSigned and Unrestricted matters. Unrestricted runs everything without any checks, which is risky in production environments. RemoteSigned strikes a better balance—it allows your locally-created scripts to run freely while still protecting against untrusted downloads.

Import the Module Manually in the Current Session

Sometimes the module is installed correctly, but PowerShell doesn't auto-load it. This can happen if you installed the module after opening your current PowerShell session.

Run:

Import-Module PSWindowsUpdate -Force

The -Force parameter reloads the module even if it's already loaded, which helps when you've updated the module or changed execution policies.

This fix only works for your current session. To make it permanent, add the import command to your PowerShell profile:

Add-Content -Path $PROFILE -Value "Import-Module PSWindowsUpdate"

If you get an error saying the profile doesn't exist, create it first:

New-Item -Path $PROFILE -ItemType File -Force

Windows 10 vs. Windows 11: Are There Differences?

The "get windowsupdate is not recognized" error appears on both operating systems, but there are some nuances worth knowing.

Windows 10: Common Pitfalls and Fixes

Windows 10 has been around long enough that you might be running an older version with a dated PowerShell. Windows 10 LTSC (Long-Term Servicing Channel) versions, in particular, can be problematic.

If you're on Windows 10 1809 or earlier, you might need to install the module manually because the PowerShell Gallery might not be accessible from older PowerShell versions. Check your PowerShell version first:

$PSVersionTable.PSVersion
Windows 10 VersionDefault PowerShellNotes
1507 - 17095.0 - 5.1Manual module installation recommended
1803 - 19095.1Gallery access works, but update PowerShell for best results
2004+5.1Full compatibility with PSWindowsUpdate

Windows 11: Modern Approach and Compatibility

Windows 11 ships with PowerShell 5.1 and supports PowerShell 7.x. The PSWindowsUpdate module works on both, but there's a path difference you need to watch for.

On PowerShell 7.x, modules install to C:\Program Files\PowerShell\Modules instead of the WindowsPowerShell path. If you switch between PowerShell 5.1 and 7.x, you might need to install the module separately for each version.

For Windows 11 users, I recommend using the latest module version and installing it with:

Install-Module -Name PSWindowsUpdate -Force -Scope CurrentUser

The -Scope CurrentUser parameter avoids permission issues that can occur with the all-users scope.


Advanced Troubleshooting: Module Not Found and Server Environments

When the basic fixes don't work, it's time to dig deeper. These advanced troubleshooting steps are particularly relevant for Windows Server environments and enterprise deployments.

Check PowerShell Module Path ($env:PSModulePath)

If the module is installed but PowerShell can't find it, the module path is likely misconfigured. This is especially common in enterprise environments where IT admins deploy modules to custom locations.

To view your current module path:

$env:PSModulePath

To add a custom path (for example, C:\PSModules where your company stores shared modules):

$env:PSModulePath += ";C:\PSModules"

This change only lasts for your current session. To make it permanent, set it at the system level:

[Environment]::SetEnvironmentVariable("PSModulePath", $env:PSModulePath + ";C:\PSModules", "Machine")

I've seen incorrect module paths cause "module not found" errors more often than any other issue in server environments. Always verify this first when troubleshooting.

Deploy PSWindowsUpdate in Enterprise via Group Policy

Managing updates across hundreds of machines manually isn't practical. For enterprise environments, you can deploy the module and configure execution policy via Group Policy.

First, set the execution policy via GPO:

  1. Open Group Policy Management Console.
  2. Navigate to Computer ConfigurationPoliciesAdministrative TemplatesWindows ComponentsWindows PowerShell.
  3. Enable Turn on Script Execution and set it to Allow local scripts and remote signed scripts.

For module deployment, you can use a startup script or a logon script. Here's a PowerShell script that silently installs the module:

if (-not (Get-Module -ListAvailable PSWindowsUpdate)) {
    Install-Module -Name PSWindowsUpdate -Force -Scope AllUsers -SkipPublisherCheck
}

You can push this via GPO startup scripts, SCCM, or Intune. In my experience, SCCM works best for large deployments because it provides reporting and error handling.

Reset Windows Update Components as a Last Resort

If the module works but updates still fail, you're dealing with a different problem. The "not recognized" error is about the module, but if you've fixed that and updates still don't install, the Windows Update service itself might be corrupted.

Here's how to reset Windows Update components:


Stop-Service -Name wuauserv -Force
Stop-Service -Name bits -Force

Rename-Item -Path C:\Windows\SoftwareDistribution -NewName SoftwareDistribution.old

Start-Service -Name wuauserv
Start-Service -Name bits

This is a separate issue from the "not recognized" error, but it's worth mentioning because users often conflate the two. If the module loads but Get-WindowsUpdate returns no results or errors, this reset often resolves the underlying service issues.


Get-WindowsUpdate vs. Get-WUInstall: Which Command Should You Use?

Once you've fixed the "not recognized" error, you'll discover that the PSWindowsUpdate module includes several commands. Two of the most commonly confused are Get-WindowsUpdate and Get-WUInstall.

Understanding the Difference

Get-WindowsUpdate lists available updates. It's a read-only operation that shows you what's available but doesn't change anything.

Get-WUInstall installs updates. It's the command you use when you're ready to actually apply the updates.

Here's a side-by-side comparison:


Get-WindowsUpdate

Get-WUInstall -AcceptAll

Think of it like shopping: Get-WindowsUpdate is browsing the shelves, while Get-WUInstall is putting items in your cart and checking out.

Common Parameters and Usage Examples

Both commands support useful parameters for filtering and automation:


Get-WUInstall -KBArticleID KB5006670 -AcceptAll

Get-WUInstall -AcceptAll -AutoReboot

Get-WindowsUpdate -Severity Critical

Here's a real-world script I use for automated update installation on servers:


Import-Module PSWindowsUpdate

Get-WUInstall -Severity Critical, Security -AcceptAll -AutoReboot -IgnoreReboot

Get-WindowsUpdate | Out-File -FilePath C:\Logs\WindowsUpdate.log

The -AutoReboot parameter automatically reboots the machine if needed, while -IgnoreReboot suppresses the reboot prompt. Use these carefully in production environments—I always test on a staging server first.


FAQ

Why is 'Get-WindowsUpdate' not recognized after I installed the PSWindowsUpdate module?

This usually happens for one of three reasons: the module isn't imported in your current session, the execution policy is blocking it, or you're running a different PowerShell version than the one you installed the module for. Run Import-Module PSWindowsUpdate first, then check Get-ExecutionPolicy. If the policy is Restricted, change it to RemoteSigned with Set-ExecutionPolicy RemoteSigned -Scope CurrentUser.

How do I install the PSWindowsUpdate module in PowerShell?

Open PowerShell as administrator and run Install-Module -Name PSWindowsUpdate -Force. Verify the installation with Get-Module -ListAvailable PSWindowsUpdate. If you're in an offline environment, download the module from the PowerShell Gallery website and manually copy it to C:\Program Files\WindowsPowerShell\Modules.

Do I need to run PowerShell as administrator for Windows Update commands?

Yes. Most PSWindowsUpdate cmdlets require elevated privileges to interact with the Windows Update service. Without admin rights, the module might load, but commands will fail with access denied errors. Always right-click PowerShell and select "Run as administrator" when working with Windows Update commands.

What is the difference between Get-WindowsUpdate and Get-WUInstall?

Get-WindowsUpdate lists available updates without making any changes. Get-WUInstall installs updates. Use Get-WindowsUpdate to see what's available, then use Get-WUInstall -AcceptAll to install them.


Conclusion

The "get windowsupdate is not recognized" error is frustrating, but it's also one of the most fixable PowerShell issues you'll encounter. The root cause is almost always a missing or unloaded PSWindowsUpdate module, not a broken Windows Update service.

Here's your quick action plan:

  1. Install the module: Install-Module -Name PSWindowsUpdate -Force
  2. Set the execution policy: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
  3. Run as administrator: Always use an elevated PowerShell session

These three steps resolve the vast majority of cases. If you're still stuck, check your module path, verify your PowerShell version, and review the advanced troubleshooting section.

If you've tried everything and still see the error, leave a comment below with your PowerShell version and Windows edition. I'll help you troubleshoot further.

← Back to Home