• Updating causing problems again!

    Home » Forums » Developers, developers, developers » DevOps Lounge » Updating causing problems again!

    Author
    Topic
    #2554203

    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?

    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!
    Computer Specs

    Viewing 4 reply threads
    Author
    Replies
    • #2554245

      Let me ask a Powershell guy I know. I’m guessing the Tiny Win11 is part of it’s build process but the Surface one, not sure about that.

      Susan Bradley Patch Lady/Prudent patcher

    • #2554339

      You wrote:

      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.

      Where did the PS modules come from? If you did a “fresh” install-module on PSWindowsUpdate, without specifying a specific version, then it would load the current module – which is 2.2.0.3.

      Windows updates do not update third-party PS modules.

      • #2554346

        There must be some way to blame it on Microsoft, Shirley? 😉

      • #2554369

        MBS,

        Well, that got me to thinking… Possible solution…

        Uninstall-Module -Name PSWindowsUpdate -Force
        Install-Module -Name PSWindowsUpdate -RequiredVersion 2.2.0.2 -SkipPublisherCheck -AllowClobber
        

        So that got the right module loaded, however it did not solve the problem in either WindowsPowerShell 5.1 or PowerShellCore 7.3.4.

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

    • #2554694

      Hey Y’all,

      Here’s the latest and even more confusing testing results.

      On the Tiny11 install I restored an Image from 3/22/2023. Now no more error messages, however the GPO settings page comes up with the titles but no values.

      Ran Windows Update to get current with the same results.

      Installed PowerShell Core 7.3.4 (a Windows Update option) with the same results.

      Went into GPedit to see what the settings were but got errors that it could not
      appv.admx
      MidcrosoftEdge.admx
      UserExpreienceVirtualization.admx

      in the C:\Windows\PolicyDefinitions folder, however, they are clearly there?

      I downloaded the admx.msi program from MS and reinstalled the files with the same result. Looks like I found a problem with Tiny11b2.

      I have an Image of the Surface Pro from 4/7/2023 so that will be my project for tomorrow and see what happens.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2555021

      Here we go again!

      Brand new just out of the box Beelink Ser 5500u w/Windows 11 Pro.
      I thought surely this would work but it’s not to “bee”, get it?, same error.
      GPEdit works fine on this machine so that’s not the problem.

      Installing the previous version of the PSWindowsUpdate module didn’t work either.

      Grrrrrrrrrrrrrrr!

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

    • #2609338

      Good Morning, Afternoon, Evening, or Night,

      I have found the problem,
      Apparently PSWindowsUpdate does not like it when there is no updateserver url set at
      “HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\WUServer”
      and
      “HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate\WUStatusServer”
      keep in mind that WUServer and WUStatusServer are not folders but are instead items of the folder WindowsUpdate in the registery

      So if you were to remove one it would look like this:
      Remove-ItemProperty -Path “HKLM:\Software\Policies\Microsoft\Windows\WindowsUpdate” -name “WUServer”
      hope this helps!

    Viewing 4 reply threads
    Reply To: Updating causing problems again!

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: