We’ve run into a strange problem with our Windows Server 2019 VMs where sometimes when we clone a new VM from our template it works perfectly fine and sometimes it won’t let you install any new Roles and throws a 0x80073701 error. Better still, sometimes it lets you install a new Role and then months later when you go to add something else it fails also with a 0x80073701.
For the longest time the only solution I was able to find online was nuke it and start over which is typically what we did. That or to manually dig through registry keys for packages installed in Windows with a different language than that of your operating system. I never was able to get that suggestion to work because I couldn’t gain the permissions I needed to delete the registry keys. We also had zero luck running DISM with it’s variety of flags.
At some point a co-worker of mine stumbled across a PowerShell script that solved the problem for us and saved us having to rebuild a few more complicated VMs.
I had to use that script tonight on a VM but this time it didn’t work. I tried to see if I could find a new version but I couldn’t even find the original script. With some fiddling I eventually got the script to work but it dawned on me that lots of people might have having this problem and the script to fix it with out wiping/reloading might not be easily found anymore.
Full Disclosure. I did not write this script, I’ve only used it a few times with success. I searched for the authors name to see if they had a Github repo or something out there and found nothing other than a LinkedIn.
Near as I can tell this script does the following:
- Elevates its privileges in a very specific looking way. I did not dig much into it since the rest of the script does not appear to do anything malicious and you should run this “As an administrator” anyway I just went with it
- It then asks you for the location of your CBS log file, if none is provided it uses the default location
- It then parses the CBS log file for any instances of ERROR_SXS_ASSEMBLY_MISSING and then parses those lines to pull out the specific package names that are causing problems
- Using it’s elevated privileges it takes ownership of that packages registry keys and changes the ‘Currentstate’ key to ‘0’ which I assume means not installed or ignored
- It does some checks to make sure the ‘Currentstate’ was successfully changed and then completes
Once the script has run you do not need to reboot. You should be able to start adding Roles to the server right away.
I have found that running the script against “C:\Windows\Logs\CBS\CBS.log” does not always solve the problem. Tonight I went into “C:\Windows\Logs\CBS\” and had to run it against the second newest log “CbsPersist_20230310065917.log”. After doing that the issue was resolved for me.
In our case it appears the issue is with KB4598230 which has been pulled from the Microsoft Update Catalogue and can no longer be downloaded. I have seen plenty of form posts involving other KBs causing the exact same error though.
Sorry, that was a lot of reading. Here is what you are after:
Abhinav Joshi, whoever you are. Thank you very much for this script. It’s saved us a ton of time and headache.
'IT이야기 > OS' 카테고리의 다른 글
Script for detecting potentially vulnerable Log4j jars [CVE-2021-44228] on Windows Server (0) | 2023.06.17 |
---|---|
Shortcut commands to open Management Console Snap-ins (0) | 2023.03.09 |
Migrating AD Integrated DNS Zones between DNS Servers (0) | 2023.02.08 |
wuauclt.exe 커맨드 옵션... (0) | 2022.12.07 |
Windows Server 평가판 다운로드 Url (1) | 2021.09.10 |