-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Object reference not set to an instance of an object. #21
Comments
Ditto... |
Hmm. Ran into errors today mentioning the same "Object reference not set to an instance of an object." Before I found this GitHub issue, I found a forum post on AskWoody.com from April 2023 that may be related as well.. I commented there as well (but post is "Awaiting Moderation")... Based on the OP's post there and some feedback from a Guest user later in the thread, I discovered something with recent versions (not sure how far back it goes).. Although there are settings in the following registry key (and/or subkeys) that can exist without configuring the use of a WSUS server, it appears that at least Get-WUSettings from PSWIndowsUpdate results in the above error if any configuration values are present in the key/subkeys if "UseWUServer" is not configured one way or the other (0 - NotUse WSUS, 1- Use WSUS).. HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate I had one or more settings configured already via registry/ADMX/GPO at the above location, but had not configured the setting defining if a WSUS server should be used or not. The moment i created: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU and set it to either 0 or 1, no more "Object reference not set to an instance of an object." errror. |
Same issue in my update script for always the same KB id: KB2267602 @bilemke I don't have that registry key at all: My script output:
|
Same here.
|
I had this issue on 1 Windows 11 PC last month. Didn't affect the Windows 10 PCs at all. This month most of the Windows 11 PCs across 3 sites are doing it. The only option that I have set in the registry for this is to disable the automatic updates. I tried adding the WSUS parameter and set it to zero. Still get the same error. I tried removing the entire key and the error persists. Something that MS did most likely broke it. PS C:\Windows\system32> Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot Install-WindowsUpdate : Something goes wrong: 2024-05 .NET 7.0.20 Security Update for x64 Client (KB5039844); Object reference not set to an instance of an object. At line:1 char:1 + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-WindowsUpdate], Exception + FullyQualifiedErrorId : Debug,PSWindowsUpdate.GetWindowsUpdate Install-WindowsUpdate : Something goes wrong: 2024-05 .NET 7.0.20 Security Update for x64 Client (KB5039844); Object reference not set to an instance of an object. At line:1 char:1 + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-WindowsUpdate], Exception + FullyQualifiedErrorId : Debug,PSWindowsUpdate.GetWindowsUpdate Install-WindowsUpdate : Something goes wrong: Windows Malicious Software Removal Tool x64 - v5.126 (KB890830); Object reference not set to an instance of an object. At line:1 char:1 + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Get-WindowsUpdate], Exception + FullyQualifiedErrorId : Debug,PSWindowsUpdate.GetWindowsUpdate Install-WindowsUpdate : Something goes wrong: Windows Malicious Software Removal Tool x64 - v5.126 (KB890830); Object reference not set to an instance of an object. At line:1 char:1 + Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -IgnoreReboot + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Same problem here, any news on how to fix it ? |
@braxtoon-hash Have you seen this yet? Rollback instructions from MS |
Thanks i'll look into that |
Updating PSWindowsUpdate to version 2.2.1.5 resolved the issue for me. |
I still get this issue "Object reference not set to an instance of an object" in 2.2.1.5 unless HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\WUServer exists or HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\UseWUServer is 1. |
Downloading and applying KB5040527 from the Microsoft Update Catalog resolves this issue. |
Isn't that just a Win11 update? I am experiencing the problem on Win10 22H2 19045.4780. |
Since several weeks I am not able anymore to install new updates. It always fails with the error: 'Object reference not set to an instance of an object'.
Does anyone know how to fix this. I have uninstalled and reinstalled PSWindowsUpdate but without success.
As an example todays full verbose output is:
VERBOSE: PC (18.05.2024 09:37:48): Connecting to Microsoft Update server. Please wait...
VERBOSE: Found [1] Updates in pre search criteria
VERBOSE: Found [1] Updates in post search criteria
Get-WindowsUpdate: Something goes wrong: Cumulative Update for Windows 11 Insider Preview (10.0.22635.3640) (KB5037867); Object reference not set to an instance of an object.
Get-WindowsUpdate: Something goes wrong: Cumulative Update for Windows 11 Insider Preview (10.0.22635.3640) (KB5037867); Object reference not set to an instance of an object.
X ComputerName Result KB Size Title
VERBOSE: Accepted [0] Updates ready to Download
VERBOSE: Downloaded [0] Updates ready to Install
VERBOSE: Installed [0] Updates
The text was updated successfully, but these errors were encountered: