Hey Y’all,
I was recently updating an old Microsoft Surface Pro given to me by a friend who no longer wanted it as he had replaced the battery once but it only lasted another year. The machine works fine plugged in though.
I did a clean install of W10 Pro, undated it to the latest release, and then proceeded to load my PowerShell scripts to see what was on the inside. Much to my dismay I received this error message:
Get-WUSettings : Object reference not set to an instance of an object. At G:\BEKDocs\Scripts\Dev-CMsLocalPCInfoW10-V-06-10-01.ps1:4527 char:18 + $WUSettings = Get-WUSettings + ~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Get-WUSettings], NullReferenc eException + FullyQualifiedErrorId : System.NullReferenceException,PSWindowsUpdate.Ge tWUSettings
Now this works fine on my other machines, or at least I thought so. So I started to investigate and couldn’t initially nail down the problem as all the necessary modules were loaded, namely PSWindowsUpdate! Finally, I tried it on my other machines with mixed results.
All machines running Win 10 Pro with the exception of the Tiny11 Pro Laptop.
Main Driver: DellXPS8920 – OK
Backup Test: DellXPS8700 – OK
Laptop Tiny11: Dell137000 – Failed!
Wife Laptop: Dell Inspiron – OK
Surface Pro 4: – Failed!
Note: the problem was manifested on Windows PowerShell & PowerShell Core 7.3.4.
After hours of beating my head on the keyboard I finally saw it!
All the working machines had PSWindowsUpdate 2.2.0.2.
Both the failing machines had PSWindowsUpdate 2.2.0.3!
Why the difference? Well that’s still a mistery as two machines one failed and one working were running Win 10 Pro Build 19045.2846.
While, another working machine had Win 10 Pro Build 19045.2728.
So just what triggers the update of these powershell modules? Could it be .Net updates? I looked at that and they are all over the place with no pattern between the machines. Ideas?