Windows 10: WSUS Updates Powershell script fails; Errorcode: 0x80240438

Discus and support WSUS Updates Powershell script fails; Errorcode: 0x80240438 in Windows 10 Installation and Upgrade to solve the problem; Hello, I am trying to run a powershell script on a Windows Server 2016 to find, download and install updates, but I get the following error:... Discussion in 'Windows 10 Installation and Upgrade' started by Voneva, Nov 30, 2018.

  1. Voneva Win User

    WSUS Updates Powershell script fails; Errorcode: 0x80240438


    Hello,


    I am trying to run a powershell script on a Windows Server 2016 to find, download and install updates, but I get the following error:


    Exception from HRESULT: 0x80240438

    ...

    + $result = $updateSearcher.Search("IsInstalled=0 and Type='Software'")

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo : OperationStopped: WSUS Updates Powershell script fails; Errorcode: 0x80240438 :)) [], COMException

    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException



    Here is my script:


    Write-Host "Installing WSUS-Updates"



    $updateSession = New-Object -Comobject Microsoft.Update.Session

    $updateSearcher = $updateSession.CreateUpdateSearcher()

    $result = $updateSearcher.Search("IsInstalled=0 and Type='Software'")



    if ($result.Updates.Count -eq 0){

    Write-Host "No available updates"

    exit

    }



    $updatesToDownload = New-Object -Comobject Microsoft.Update.UpdateColl



    foreach ($update in $result.Updates){

    $updatesToDownload.Add($update)

    }



    $downloader = $updateSession.CreateUpdateDownloader()

    $downloader.Updates = $updatesToDownload

    $downloadResult = $downloader.Download()



    $updatesToInstall = New-Object -Comobject Microsoft.Update.UpdateColl



    foreach ($update in $result.Updates){

    if ($update.IsDownloaded) {$updatesToInstall.Add($update)}

    }



    $installer = $updateSession.CreateUpdateInstaller()

    $installer.Updates = $updatesToInstall

    $installationResult = $installer.Install()


    exit


    I tried running it with admin privileges also, but did not help.

    WUServer and WUStatusServer register keys are set to the same path (I read that this may be the problem..)


    What could possibly cause the issue?


    Thank you in advance!!

    :)
     
    Voneva, Nov 30, 2018
    #1

  2. Configure WSUS with Powershell

    Hi Guys,<br /><br />I have managed to create a PowerShell script which configures our WSUS settings, but I am not able to figure out how I move the computer setting from "Use the Update Services console" to "Use Group Policy or registry settings on computers".<br
    /><br />Have any of you had any luck?
     
    Peter Harslev, Nov 30, 2018
    #2
  3. Kursah Win User
    PowerShell instead of Commandline in Creators Update

    Interestingly enough my personal laptop just got the update...and still has Command Prompt listed, not PowerShell...

    Edit: Not that it matters...I use both regularly. *Toast :toast:
     
    Kursah, Nov 30, 2018
    #3
  4. WSUS Updates Powershell script fails; Errorcode: 0x80240438

    Power Shell script windows update

    Hi! I need to test the behavior of my application to install Windows updates to version 1803. I have Windows 10 version 1607 and version 1703. I want on the virtual machine to lift Windows server 2016 in a role of WSUS, and
    2 virtual machines with different versions of Windows. Can I do it with powershell script? Can I use a script to select and download updates to WSUS? or should I just do it manually?

    Is it possible the script in which when you run one powershell script and put the virtual machine is configured for WSUS updates are downloaded and 2 virtual machines updated to version 1803? Your answer is very important
     
    Maksim Timo, Nov 30, 2018
    #4
Thema:

WSUS Updates Powershell script fails; Errorcode: 0x80240438

Loading...
  1. WSUS Updates Powershell script fails; Errorcode: 0x80240438 - Similar Threads - WSUS Updates Powershell

  2. WSUS Update for window 10 Failed

    in Windows 10 Gaming
    WSUS Update for window 10 Failed: Hi , i was tasked to use WSUS Update to update Patches for 30 - 40Pc. but i noticed that after running the installer it says Failed to update . https://answers.microsoft.com/en-us/windows/forum/all/wsus-update-for-window-10-failed/074afe45-38e4-4050-93c7-9cdfa3a6889b
  3. WSUS Update for window 10 Failed

    in Windows 10 Installation and Upgrade
    WSUS Update for window 10 Failed: Hi , i was tasked to use WSUS Update to update Patches for 30 - 40Pc. but i noticed that after running the installer it says Failed to update . https://answers.microsoft.com/en-us/windows/forum/all/wsus-update-for-window-10-failed/074afe45-38e4-4050-93c7-9cdfa3a6889b
  4. Pause windows update with a powershell script

    in Windows 10 Gaming
    Pause windows update with a powershell script: Hi,I am trying to remotley pause windows update using a powershell script.I have tried installing PSWindowsUpdate module on the remote PC and then running: Set-WindowsUpdateAutoUpdateOption -AutoUpdateOption 2This didnt work and i am getting that...
  5. 0x80240438 update error

    in Windows 10 Gaming
    0x80240438 update error: Error 0x80240438 in my Windows 11. Need urgent help https://answers.microsoft.com/en-us/windows/forum/all/0x80240438-update-error/4742ac1e-9678-4b71-afed-fcfba7c697b6
  6. PowerShell script

    in Windows 10 Support
    PowerShell script: The code below tests a series of IPs in a txt file.The result is as follows and is written in a txt file. 19.191.12.161 - online 19.191.12.162 - offline 19.191.12.163 - offline 19.191.12.164 - offline 19.191.12.165 - offline also see the scrennshot Code: $Output= @()$GetIP =...
  7. powershell scripts

    in AntiVirus, Firewalls and System Security
    powershell scripts: Hi, I have azure. Someone is somehow installing powershell scripts onto my computer that allows them to host my PC through P2P and UDP connections, well I think so anyway. I have only just found powershell script entry changes in my registry by accident. These criminals...
  8. powershell script

    in Windows 10 Customization
    powershell script: looking for a script to monitor for a folder, if there is a file in that folder send it as an email, once the email is sent out, confirm and then move the files to an archive folder. monitor c:\test\*.pdf No files, do not send email. Yes Files, send an email to someone at...
  9. win defend update error 0x80240438

    in AntiVirus, Firewalls and System Security
    win defend update error 0x80240438: hello, i am having problem w\ win defend update the internet is ok but it wont work help plz Jamie https://answers.microsoft.com/en-us/protect/forum/all/win-defend-update-error-0x80240438/f2c0a371-5c66-44d9-b856-93a302190015
  10. Error 0x80240438 when checking for updates

    in Windows 10 Updates and Activation
    Error 0x80240438 when checking for updates: Hello. I cannot check for updates in Windows 10 9926. I get the error 0x80240438. I already tried disabling my antivirus, didn't help. 4621
Tags:

Users found this page by searching for:

  1. Search for updates failed Error: Exception from HRESULT: 0x80240438 Failed Item:

    ,
  2. 0x80240438 error code in powerbi

    ,
  3. Exception from HRESULT: 0x80240438

    ,
  4. powershell add-capabilities error 0x80240438,
  5. powershell error 0x80240438,
  6. error 0x80240438 exception from hresult 0x80240438,
  7. powerhsell 0x80240438,
  8. batch patch Error 0x80240438,
  9. powershell 0x80240438,
  10. 80240438,
  11. offline .net framework 3.5 error 0x80240438,
  12. powershell wsus script,
  13. wsus 0x80240438.,
  14. powershell wsus install error code,
  15. vbs 0x80240438