Powershell – Errors when attempting to update source files, Server 2012R2 (errors 80073701 and 14081)

powershellwindows-server-2012-r2windows-update

I have a Windows Server 2012R2 machine that I installed with Server Core, and then decided that I wanted to switch to GUI.

I'll make the long story short: I ran windows updates, and now the source files are older/out of sync with the operating system, and I need to update the source files.

Here are a couple of articles that outline how this is supposed to work:

http://blog.coretech.dk/kaj/why-i-cant-convert-my-windows-server-2012-r2-core-to-gui/

http://blogs.technet.com/b/joscon/archive/2012/11/14/how-to-update-local-source-media-to-add-roles-and-features.aspx

I have followed these instructions, but the updates are not successfully updating the source. I get errors like:

"An error occurred – Package_for_KB29671203 Error: 0x80073701, Error:
14081, The referenced assembly could not be found."

or

"add-windowspackage failed. error code = 0x80073701,
add-windowspackage: the referenced assembly could not be found"

I've extensively searched for help on those error codes related to Server 2012 and windows updates, but my google-fu is failing me.

I am using windows update packages found in c:\Windows\SoftwareDistribution\Download

How can I get these updates to bring my source files up to current?

Thanks!

Best Answer

When I was first building a VM template for Windows 2012, I wanted the base install to be core. I was going to have a deployment option that would kick off a GUI install script during the provisioning if you wanted GUI instead.

I ran into the same problems you did, and I found the same regurgitated series of posts outlining how you just need to point at an updated installation source.

I spent over 2 weeks doing nothing but trying to get this to work. I created WIM files and updated that. I created VHDs and tried to update those, and I used PowerShell to get updates from WSUS using the new cmdlets, in order to automate the process of updating the images.

Bottom line is that it never worked. I could try it with 1 update. And it worked with that. A few more it worked with that. But there were hundreds of updates and somewhere along the way, one update or some combination of updates prevented the transition.

Unfortunately, I eventually just decided to make my template GUI by default, and have a Core option. If you choose core on deployment with my template, then it removes the GUI, and tries to remove all the roles and features that core didn't have (I diffed them to find out). It still doesn't end up as small as core.

But what I did find is that doing it this way has so far always allowed me to go from one of these core machines back to GUI.

What I think is happening

One of the things I noticed when trying to update an installation source, is that not all updates are allowed to be installed offline and this meant it was impossible for me to make an offline installation source that was completely up to date.

I toyed with the idea of having a VM whose sole purpose to be a GUI install that I applied updates to and then made a WIM out of it to use as an install source just for deploying VMs that started as Core but wanted to add a GUI later.

I never got around to it, mostly because it would be a huge pain in the ass for very little benefit; we almost never switch from Core to GUI.

I wish I had better news for you; this issue really irks me. And it's not fixed in 2012 R2 (as you're seeing).

If you ever figure out an easy way to work around this, do let me know; I'm very interested.