Script to fix windows update.

Dinesh Negi 66 Reputation points
2022-10-19T10:58:31.117+00:00

Hello Everyone,

Do you guys have any script /or batch file . If any issue arise for particular patch and that script can either fix the corruption or by pass the that particular patch and install other remaining patches instead of roll back either it can generate the log which patch is causing the issue, Please don't say use DISM /or windowslog

Thanks for your help

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,127 questions
Windows Server Migration
Windows Server Migration
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Migration: The process of making existing applications and data work on a different computer or operating system.
408 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,363 questions
0 comments No comments
{count} votes

9 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2022-10-19T13:35:22.057+00:00

    You could write your script based on the manual steps here.
    https://learn.microsoft.com/en-us/windows/deployment/update/windows-update-resources#reset-windows-update-components-manually

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    1 person found this answer helpful.

  2. Dinesh Negi 66 Reputation points
    2022-10-21T09:55:10.547+00:00

    Thanks, I already gone through this article.

    Is that something I can know which patch is causing the issue. How we can troubleshoot on that.

    0 comments No comments

  3. Dave Patrick 426.1K Reputation points MVP
    2022-10-21T11:21:26.917+00:00

    Given updates are now cumulative it's likely the most recent update (if any). The \windowsupdate.log, \cbs.log could be checked for more details.

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

  4. Dinesh Negi 66 Reputation points
    2022-10-21T23:25:07.977+00:00

    totally agreed ...that what we follow.

    My question :can we have something in script /or batch file ...where we will run that against these logs and that will show what patch is causing an issue.

    0 comments No comments

  5. Dave Patrick 426.1K Reputation points MVP
    2022-10-21T23:28:02.493+00:00

    It may be possible, but there's nothing canned for this. You may need to write your own.

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments