Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / PowerShell / Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)

March 17, 2024 PowerShellWindows 10Windows 11Windows Server 2019Windows Server 2022

Install and Manage Windows Updates with PowerShell (PSWindowsUpdate)

You can use the PSWindowsUpdate PowerShell module to manage Windows Updates from the command line. PSWindowsUpdate module is available for download from the PowerShell Gallery and allows administrators to scan, download, install, remove, or hide Windows updates on local or remote workstations and servers.

Contents:
  • Installing the PSWindowsUpdate Module
  • Scan and Download Windows Updates with PowerShell
  • Installing Windows Updates with PowerShell
  • Check Windows Update History Using PowerShell
  • Uninstalling Windows Updates with PowerShell
  • How to Hide or Show Windows Updates Using PowerShell
  • Install Windows Updates on Remote Computers with PowerShell

Installing the PSWindowsUpdate Module

You can install the PSWindowsUpdate module on Windows 10/11 and Windows Server 2022/2019/2016 from the online repository (PSGallery) using the command:

Install-Module -Name PSWindowsUpdate -Force

Confirm adding repositories by pressing Y. Check that the update management module is installed on Windows:

Get-Package -Name PSWindowsUpdate

Install-Module PSWindowsUpdate from PSGallery

  • In an isolated environment, the PSWindowsUpdate module can be installed offline;
  • To use the module on older versions of Windows, you must update the version of PowerShell.

You can remotely install the PSWindowsUpdate module on other computers on the network. The following command will copy the module files to the specified computers (WinRM is used to access remote computers).

$Targets = "lon-fs02.woshub.loc", "lon-db01.woshub.loc"
Update-WUModule -ComputerName $Targets –Local

The default PowerShell script execution policy in Windows blocks the third-party cmdlets (including PSWindowsUpdate commands) from running,

Set-ExecutionPolicy –ExecutionPolicy RemoteSigned -force

Or, you can allow module commands to run only in the current PowerShell session:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process

Import the module into your PowerShell session:

Import-Module PSWindowsUpdate

List available cmdlets in the PSWindowsUpdate module

Get-Command -module PSWindowsUpdate

list PSWindowsUpdate module commands

Check the current Windows Update client settings:

Get-WUSettings

ComputerName                                 : WKS5S2N39S2
WUServer                                     : http://MN-WSUS:8530
WUStatusServer                               : http://MN-WSUS:8530
AcceptTrustedPublisherCerts                  : 1
ElevateNonAdmins                             : 1
DoNotConnectToWindowsUpdateInternetLocations : 1
TargetGroupEnabled                           : 1
TargetGroup                                  : ServersProd
NoAutoUpdate                                 : 0
AUOptions                                    : 3 - Notify before installation
ScheduledInstallDay                          : 0 - Every Day
ScheduledInstallTime                         : 3
UseWUServer                                  : 1
AutoInstallMinorUpdates                      : 0
AlwaysAutoRebootAtScheduledTime              : 0
DetectionFrequencyEnabled                    : 1
DetectionFrequency                         : 4

Get-WUSettings - list current Windows Update Setting on computer

In this example, the Windows Update client on the computer is configured by GPO to receive updates from the local WSUS update server.

Scan and Download Windows Updates with PowerShell

To scan your computer against an update server and get the updates it needs, run the command:

Get-WindowsUpdate

Or:

Get-WUList

The command lists the updates that need to be installed on your computer.

scan computer for available windows updates

The first time you run the Get-WindowsUpdate command, it may return an error:

Value does not fall within the expected range.

get-windowsupdate error: Value does not fall within the expected range.

To fix the error, you must reset the Windows Update agent settings, re-register the libraries, and restore the wususerv service to its default state by using the command:

Reset-WUComponents -Verbose

reset windows update components with powershell Reset-WUComponents

To check the source of Windows Update on your computer (is it the Windows Update servers on the Internet or is it the local WSUS), run the following command:

Get-WUServiceManager

Get-WUServiceManager – get update sources

In this example, the computer is configured to receive updates from the local WSUS server (Windows Server Update Service = True). In this case, you should see a list of updates that have been approved for your computer.

To scan your computer against Microsoft Update servers on the Internet (these servers contain updates for Office and other products in addition to Windows updates), run this command:

Get-WUlist -MicrosoftUpdate

You will get this warning:

Get-WUlist : Service Windows Update was not found on computer. Use Get-WUServiceManager to get registered service.

To allow scanning on Microsoft Update, run this command:

Add-WUServiceManager -ServiceID "7971f918-a847-4430-9279-4a52d1efe18d" -AddServiceFlag 7

If you want to remove specific products or specific KBs from the list of updates that your computer receives, you can exclude them by:

  • Category (-NotCategory);
  • Title (-NotCategory);
  • Update number (-NotKBArticleID).

For example, to exclude driver updates, OneDrive, and a specific KB from the update list:

Get-WUlist -NotCategory "Drivers" -NotTitle "OneDrive" -NotKBArticleID KB4489873

You can download all available updates to your computer (update files are downloaded to the local update cache in the C:\Windows\SoftwareDistribution\Download).

Get-WindowsUpdate -Download -AcceptAll

Windows will download any available updates (MSU and CAB files) from the update server to the local update directory, but it will not install them automatically.

Download Windows updates locally with PowerShell

Installing Windows Updates with PowerShell

To automatically download and install all available updates for your Windows device from Windows Update servers (instead of local WSUS), run the command:

Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -AutoReboot

The AcceptAll option accepts the installation of all update packages, and AutoReboot allows Windows to automatically restart after the updates are installed.

You can also use the following options:

  • IgnoreReboot – disable automatic computer reboot;
  • ScheduleReboot – Schedule the exact time of the computer’s reboot.

You can write the update installation history to a log file (you can use it instead of the WindowsUpdate.log file).

Install-WindowsUpdate -AcceptAll -Install -AutoReboot | Out-File "c:\logs\$(get-date -f yyyy-MM-dd)-WindowsUpdate.log" -force

You can only install the specific updates by their KB numbers:

Get-WindowsUpdate -KBArticleID KB2267602, KB4533002 -Install

Get-WindowsUpdate Install updates powershell

If you want to skip some updates during installation, run this command:

Install-WindowsUpdate -NotCategory "Drivers" -NotTitle OneDrive -NotKBArticleID KB4011670 -AcceptAll -IgnoreReboot

Check whether you need to restart your computer after installing the update (pending reboot):

Get-WURebootStatus | select RebootRequired, RebootScheduled

check for pending reboot with powershell Get-WURebootStatus

Check Windows Update History Using PowerShell

The Get-WUHistory cmdlet is used to get the list of updates that have previously been automatically or manually installed on your computer.

Get-WUHistory - checking windows update history

Check the date when the specific update was installed on the computer:

Get-WUHistory| Where-Object {$_.Title -match "KB4517389"} | Select-Object *|ft

Get-WUHistory for a specific KB

Find out when your computer was last scanned and when the update was installed:

Get-WULastResults |select LastSearchSuccessDate, LastInstallationSuccessDate

Get-WULastResults - last update scan

Uninstalling Windows Updates with PowerShell

Use the Remove-WindowsUpdate cmdlet to uninstall Windows updates on a computer. Simply specify the KB number as the argument of the KBArticleID parameter:

Remove-WindowsUpdate -KBArticleID KB4489873 -NoRestart

How to Hide or Show Windows Updates Using PowerShell

You can hide certain updates to prevent the Windows Update service from installing them (most often you need to hide the driver updates). For example, to hide the KB4489873 and KB4489243 updates, run these commands:

$HideList = "KB4489873", "KB4489243"
Get-WindowsUpdate -KBArticleID $HideList –Hide

Or use an alias:

Hide-WindowsUpdate -KBArticleID $HideList -Verbose

powershell - hide specific KBs in windows update

Hidden updates will not appear in the list of available updates the next time you use the Get-WindowsUpdate command to check for updates.

List hidden updates:

Get-WindowsUpdate –IsHidden

Notice that the H (Hidden) attribute has appeared in the Status column for hidden updates.

Get-WindowsUpdate –IsHidden - find hidden updates

To unhide updates on the computer:

Get-WindowsUpdate -KBArticleID $HideList -WithHidden -Hide:$false

or:

Show-WindowsUpdate -KBArticleID $HideList

Install Windows Updates on Remote Computers with PowerShell

Almost all PSWindowsUpdate cmdlets allow you to manage updates on remote computers. Use the –Computername parameter for that. WinRM must be enabled and configured (manually or via GPO) on remote computers. The PSWindowsUpdate module can be used to remotely manage Windows Updates both on computers in an AD domain and a workgroup (requires PowerShell Remoting configuration for workgroup environment).

To manage updates on remote computers, you must add hostnames to your WinRM trusted hosts list or configure PowerShell Remoting (WinRM) via HTTPS.

winrm set winrm/config/client '@{TrustedHosts="server1,server2,…"}'

Or with PowerShell:
Set-Item wsman:\localhost\client\TrustedHosts -Value server1 -Force

You can use the Invoke-Command command to enable the PSWindowsUpdate module on the remote computers and open the required ports in the Windows Defender firewall (Enable-WURemoting command):

$Targets = "lon-fs02", "lon-db01"
Invoke-Command -ComputerName $Target -ScriptBlock {Set-ExecutionPolicy RemoteSigned -force }
Invoke-Command -ComputerName $Target -ScriptBlock {Import-Module PSWindowsUpdate; Enable-WURemoting}

Check the list of available updates on the remote computer:

Get-WUList –ComputerName server2

Download and install all available updates on several remote Windows hosts:

$ServerNames = "server1, server2, server3"
Invoke-WUJob -ComputerName $ServerNames -Script {ipmo PSWindowsUpdate; Install-WindowsUpdate -AcceptAll | Out-File C:\Windows\PSWindowsUpdate.log } -RunNow -Confirm:$false -Verbose -ErrorAction Ignore

The Invoke-WUJob cmdlet creates a Scheduler task on the remote computer that runs under a local SYSTEM account.

You can set the exact time you want Windows updates to be installed:

Invoke-WUJob -ComputerName $ServerNames -Script {ipmo PSWindowsUpdate; Install-WindowsUpdate –AcceptAll -AutoReboot | Out-File C:\Windows\PSWindowsUpdate.log } -Confirm:$false -TriggerDate (Get-Date -Hour 22 -Minute 0 -Second 0)

Check the status of the update installation task:

Get-WUJob -ComputerName $ServerNames

If the command returns an empty list, the update installation task is complete on all computers.

Check multiple remote hosts for the specific update:

"server1","server2" | Get-WUHistory| Where-Object {$_.Title -match "KB4011634"} | Select-Object *|ft

To get the latest update installation date on all domain computers, use the Get-ADComputer cmdlet (from the Active Directory for PowerShell module):

$Computers=Get-ADComputer -Filter {enabled -eq "true" -and OperatingSystem -Like '*Windows*' }
Foreach ($Computer in $Computers)
{
Get-WULastResults -ComputerName $Computer.Name|select ComputerName, LastSearchSuccessDate, LastInstallationSuccessDate
}

The PSWindowsUpdate PowerShell module provides a convenient way to download and install Windows updates from the command prompt. This is a useful option for installing updates on hosts without a GUI: Windows Server Core or Hyper-V Server.  This module is also essential if you need to install and track update installation on multiple Windows servers/workstations at the same time.

51 comments
15
Facebook Twitter Google + Pinterest
previous post
Checking User Sign-in Logs in Entra ID (Microsoft 365)
next post
The Application Failed To Start Because Its Side-by-Side Configuration is Incorrect

Related Reading

Configure NTP Time Source for Active Directory Domain

May 6, 2025

How to Cancel Windows Update Pending Restart Loop

May 6, 2025

View Windows Update History with PowerShell (CMD)

April 30, 2025

Cannot Install Network Adapter Drivers on Windows Server

April 29, 2025

Change BIOS from Legacy to UEFI without Reinstalling...

April 21, 2025

51 comments

Paul Smith June 6, 2019 - 7:52 pm

Excellent piece. One surprise though was it was published in Mar of 2019 and I notice it uses Invoke-WUInstall which seems to have been removed from the current version of PSWindowsUpdate so wondering what version you based the article on

Reply
Elias February 23, 2024 - 4:41 pm

No match was found for the specified search criteria and module name ‘PSWindowsUpdate’. Apparently the module is no longer available. Is this so?

Reply
Me July 24, 2024 - 1:14 pm

Works fine

Reply
Afonso Alves September 25, 2019 - 1:26 pm

Excellent Article. Thanks

Reply
Daniel Jonasson October 11, 2019 - 1:56 pm

I get “Update-WUModule : A parameter cannot be found that matches parameter name ‘LocalPSWUSource’.”

Reply
scribe_pl November 18, 2019 - 10:24 am

did anyone try to run remotely, massively on several computers, install downloaded updates (from WSUS) and restart?

Reply
asfasfasfasf November 18, 2019 - 8:05 pm

It looks like Invoke-WUInstall is now Invoke-WUJob

Reply
kriske November 19, 2019 - 3:32 pm

can you also let a client check for update to a nother computer in your VPN network and what ports and ^protocols needs to be open on a firewall? the client whit the updates is only reachable by ip so can we search whit client x on client y for updates by IP?

Reply
akim December 23, 2019 - 10:06 am

awesome post , thanks for the same.

Reply
Akos March 4, 2020 - 10:28 am

I get a following error message, when I tried to run this command: Get-WUInstall -MicrosoftUpdate -IgnoreUserInput -AcceptAll -IgnoreReboot -Verbose
Error message: WARNING: Can’t find registered service Microsoft Update. Use Get-WUServiceManager to get registered service.
Do you have idea why cannot run this command?

Reply
Max Strzelecki April 6, 2020 - 6:52 pm

Awesome script, thanks! I found one issue though, after I disabled Windows Update access using the command “set-wusettings DisableWindowsUpdateAccess”, I can’t re-enable it. I tried adding “False” at the end of the command, but it throws an error. Is there a different way to re-enable Windows Update Access?

Thanks

Reply
admin April 14, 2020 - 8:11 am

Please show me the Set-ClientWSUSSetting command that you are using and the full PowerShell error test.

Reply
Ict Test April 23, 2020 - 7:24 pm

What happens with with install Windows Updates on remote computers sections;
…Invoke-WUInstall : A parameter cannot be found that matches parameter name ‘RunNow’.
…Invoke-WUInstall : A parameter cannot be found that matches parameter name ‘SkipModuleTest’.

Reply
Alex May 19, 2020 - 2:14 pm

Total PS noob here. I’ve got PSWindowsUpdate (v2.2.0.2) installed on various Windows Server 2016 VMs and a Windows 10 VM I am executing their commands remotely from. I was able to update all of my server VMs successfully using PSWU commands. But, after restarting, a few of the VMs no longer respond to remote commands though the same commands work from the VMs’ consoles.

The problems some servers experience are one of two issues:
1) The command seemingly executes but nothing is returned.
For instance, on my Win10 VM I enter “get-wuhistory -computername SERVER -verbose” and get “Connecting to default for SERVER. Please wait…” No data is returned. I just come back to the PS prompt within a couple of seconds. Executing the command in PS at the server’s console results in the full history of applied Windows updates.
2) I enter the command “get-wuhistory -computername SERVER -verbose” and get the following results

—————————————————–
VERBOSE: Performing the operation “(5/19/2020 8:58:35 AM) Get Windows Update History” on target “SERVER”.
get-wuhistory : CORP-SYS-DC-01: Unknown failure.
At line:1 char:1
+ get-wuhistory -computername SERVER -verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Get-WUHistory], Exception
+ FullyQualifiedErrorId : Unknown,PSWindowsUpdate.GetWUHistory
—————————————————–

Again, these commands worked fine until I restarted some of the servers. Oddly, the problem affects only a few of my servers.

Reply
admin May 21, 2020 - 7:32 am

Try if you can connect to these computers through PowerShell remoting. For example,
Enter-PSSession -ComputerName server
or try to get WU history with the Invoke-Command:
Invoke-Command -ComputerName Server1, Server2 -ScriptBlock {get-wuhistory -verbose}

Reply
Shawn October 15, 2020 - 9:24 pm

I have been successful in getting some updates to run, but i have two that are sitting in pending install state, and they never install. is there a parameter that needs to be input to get these pending install updates to go?

Reply
Elisei Kulikovsky March 17, 2021 - 6:00 am

Can someone please explain me what update statuses are? I know that H means hidden, also I saw D. If I get it right there are 7 of them.

Reply
E March 19, 2021 - 1:25 pm

agreed – whats the “D” mean and others?

Reply
January July 23, 2022 - 12:41 pm

D = DOWNLOADED

Reply
Elisei Kulikovsky October 30, 2022 - 11:22 pm

Statuses (Get-Help Get-WindowsUpdate -detailed): [A|R]DIMHUB
A – IsAccetped
R – IsRejected
D – IsDownloaded
I – IsInstalled
M – IsMandatory
H – IsHidden
U – IsUninstallable
B – IsBeta

F – DownloadFailed
? – IsInvoked
F – InstallFailed
? – IsInvoked
R – RebootRequired

Reply
Fred March 17, 2021 - 12:20 pm

Sadly, the Remove-WindowsUpdate command has no -force parameter, making it useless for managed environment. I was looking for an alternative to wusa.exe, as it’s /quiet parameter is no longer supported in Windows 10. Sadly, it seems there is currently no way to silently remove certain updates, as the only alternative to wusa, dism, doesn’t list all updates :-/

Reply
Murali March 24, 2021 - 1:04 pm

Nice Article!. But the last patched details is not shown in “View Update History” in system

Reply
Asojla April 14, 2021 - 5:41 am

I have the same issue: last patched details is not shown in “View Update History” in system.

Reply
Nsoci June 13, 2024 - 7:29 am

Hi, more than 3 years later I have the same problem, the patches installed using “Get-WindowsUpdate -Install” are not visible in the update history in Settings (but I see them with Get-WUHistory).
This is a blocking issue for us, any idea how to fix this ?
Many thanks

Reply
Nsoci June 13, 2024 - 7:57 am

After testing it again on a Server 2019, it’s even worse than I thought : after restarting, the update is still missing from History, even if the result in Get-WUHistory is “Succeeded”, the update is still visible in Settings as “Pending install”.
Still the same even after a forced check with “usoclient.exe startscan” and restarting the wuauserv service.
I had to press the Install Now button to get rid of the already installed update, and it finally showed in update History (it took 2 seconds to install with no restart required).
Using PSWindowsUpdate will patch your servers, but if you are part of a team your colleagues could think some patches are missing.

Reply
Ole Christian May 19, 2021 - 1:49 pm

On some of my servers I get this error message when running this command:
invoke-command -ComputerName $c -ScriptBlock { Invoke-WUjob -ComputerName localhost -Script “ipmo PSWindowsUpdate; Install-WindowsUpdate -AcceptAll | Out-File C:\PSWindowsUpdate.log” -Confirm:$false -RunNow}

Any tips?

(10,44):StartBoundary:2021-05-19T15.35.38
+ CategoryInfo : NotSpecified: (:) [Invoke-WUJob], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,PSWindowsUpdate.InvokeWUJob

Reply
Raj September 3, 2021 - 2:57 pm

Invoke-command required elevated rights make sure you’re running Invoke-command as admin.

Reply
Joakim Hellström August 20, 2021 - 6:57 pm

I’ve got the error:
Invoke-WUJob : The network path was not found. (Exception from HRESULT: 0x80070035)
when trying to install on remote machine. Cannot figure out why.

Reply
Roman January 10, 2024 - 12:00 pm

Joakim, did you found a solution about this problem? I run into the same issue and couldn’t find a solution yet

Reply
Matthias Luger November 25, 2021 - 12:23 pm

you have to set the executionpolicy to unrestricted and enable the WURemoting

Invoke-Command -ComputerName $computer -ScriptBlock {Set-ExecutionPolicy Unrestricted}
Invoke-Command -ComputerName $computer -ScriptBlock {Import-Module PSWindowsUpdate; Enable-WURemoting}

Reply
Menno April 28, 2022 - 6:22 pm

Is it possible to have multiple -NotTitle value’s?
For example: -NotTitle “Intel – Extension”, “ELAN – Mouse”

with -KBArticleID it should be possible to have multiple value’s but the updates I want to block don’t have KBArticleID’s

Reply
admin May 12, 2022 - 7:29 am

I use this syntax for the NotCategory parameter:
$UpdateCats = “‘Drivers’,’Feature Packs'”
-NotCategory $UpdateCats
Try to specify several values for the -NotTitle parameter in the same way.

Reply
David Hendy December 12, 2022 - 3:46 pm

Sadly this seems to not work for -nottitle parameter.

Reply
January July 23, 2022 - 12:40 pm

why below code with select-object dont work? pls try, i’m have results without select-obect, but when im try to choise one valu results is empty, pls try:

get-windowsupdate | select-object KB

why it dont work?

Reply
A.Obert August 12, 2022 - 2:27 pm

Nice script, thank you
A question:
I want to use the script in a Windows rollout (automated installation)
To do this, I am looking for a variable so that my script knows that the update is complete.
I thought of a process, but can’t find anything relevant.
Any idea ?
Greeting
A. Obert

Reply
Marian November 9, 2022 - 2:24 pm

Install-Module -Name PSWindowsUpdate -Force
this is not working
+ CategoryInfo : InvalidArgument: (:) [Install-Module], ArgumentException

Reply
cd February 27, 2023 - 4:19 am

This is what i’m going with for now:
invoke-wujob -computername -script “set-executionpolicy bypass -scope process -force; import-module pswindowsupdate; enable-wuremoting; start-sleep -seconds 60; get-windowsupdate -acceptall -install -autoreboot | out-file “C:\wulogs.log” -confirm:$false -verbose -runnow

Reply
Pedro May 27, 2023 - 8:35 pm

Unable to install optional quality updates.
🙁

Reply
James September 5, 2023 - 4:03 pm

What ports are require to push the module from a local machine to remote machines, and also to run the commands against remote machines?
We have a highly locked down firewall infrastructure, and need to approach the firewall team with a set of ports to allow for the use of this module.

Reply
Jose Cerna December 8, 2023 - 4:08 pm

Install-WindowsUpdate -AcceptAll -AutoReboot:$false -IgnoreReboot -Category “Drivers”

Anyone know how to exclude firmware from “Drivers”, I want to find and install all missing drivers but not firmware.

Reply
admin March 1, 2024 - 12:32 pm

🩹Deferred patch deployment on Windows Server hosts is used by many organizations. If you have a maintenance window and need to quickly download and install updates on all servers, you can use the PSWindowsUpdate module:
1️⃣ Generate a list of Windows Server hosts in AD:
$Servers = Get-ADComputer -SearchBase “OU=Servers,OU=US,DC=woshub,DC=loc” -Filter { OperatingSystem -like “*Windows Server*” } | Select -ExpandProperty name
🔹or from TXT file:
$Servers = Get-Content c:\scripts\servers.txt
2️⃣ Start the installation of the updates on the servers from the list:
Invoke-WuJob -ComputerName $Servers -Script { import-module PSWindowsUpdate; Set-ExecutionPolicy Bypass -Scope Process -Force; Install-WindowsUpdate -AcceptAll -AutoReboot | Out-File “C:\temp\PSWindowsUpdate.log”} -RunNow -Confirm:$false -Verbose -ErrorAction Ignore
This command creates a scheduled task on computers with SYSTEM privileges that will install the update and reboot when it is complete.
3️⃣ Check the update installation status:
Get-WUJob -ComputerName $Servers

Reply
James Edmonds March 8, 2024 - 9:36 pm

How can I pass a variable into the Invoke-WUJob -Script parameter?
e.g, I want to specify a log file path in the parent script, and pass this to the Invoke-WUJob -Script parameter.
Whether I just use $Date or $using:Date, it just sends this through as a string rather than evaluating it

Reply
C March 13, 2024 - 10:19 am

Hello, I am having an issue with the command “get-wusettings”. At first I wasn’t getting an output I used the function. Now I get my computer name only, nothing else.

Reply
admin March 13, 2024 - 11:57 am

This means that the default Windows Update settings are used.

Reply
C May 9, 2024 - 6:57 pm

How can change that? My computer isn’t updating think it may be a Trojan. It says it updates but the update never gets installed.

Reply
admin May 21, 2024 - 12:00 pm

1) Try resetting your Windows Update Agent settings: https://woshub.com/reset-windows-update-agent-and-service-to-default/
2) and check again for any updates:: Get-WindowsUpdate
3) If that doesn’t help, try manually downloading and installing the latest cumulative update for your Windows version. https://woshub.com/download-install-windows-updates-manually/

Reply
Ross Jonas June 3, 2024 - 5:32 am

I was looking for a command to let me skip the “preview” updates, in the article, you give some examples for -NotTitle but in the initial section that explains it, you do NotCategory twice.

If you want to remove specific products or specific KBs from the list of updates that your computer receives, you can exclude them by:

Category (-NotCategory);
Title (-NotCategory);

Reply
WeiMan Wong June 27, 2024 - 3:07 am

How to trigger the feature update to apply? The system Windows feature update had been fully installed but not applied after I triggered the reboot command to run. get-wureboot and y.

Reply
admin June 27, 2024 - 8:16 am

Does the Get-WindowsUpdate command see the feature update?
Try to download and install all the available updates from SYSTEM account using the command:
Invoke-WuJob -ComputerName 'localhost' -Script { import-module PSWindowsUpdate; Get-WindowsUpdate -Download -AcceptAll | Out-File C:\ps\PSWindowsUpdate.log} -RunNow -Confirm:$false
Then check the log file.

Reply
WEIMAN WONG July 11, 2024 - 4:36 am

Thanks, the installation is ok just the system will not applied it even you trigger the reboot command. Only the system will applied the feature update if I run the usoclient startinteractivescan but this will update everything which I do not want the system to do. It wasted time since the system is to update from Win10 to Win11.

Reply
WM July 11, 2024 - 4:21 am

Any command is just for update feature update Only? Then trigger restart.

Reply

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMware
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025
  • How to Write Logs to the Windows Event Viewer from PowerShell/CMD

    March 3, 2025
  • How to Hide (Block) a Specific Windows Update

    February 25, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Download Offline Installer (APPX/MSIX) for Microsoft Store App
  • Fix: Remote Desktop Licensing Mode is not Configured
  • How to Delete Old User Profiles in Windows
  • How to Install Remote Server Administration Tools (RSAT) on Windows
  • Configuring Port Forwarding in Windows
  • Start Menu or Taskbar Search Not Working in Windows 10/11
  • Get-ADUser: Find Active Directory User Info with PowerShell
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top