At one of my customers, I was working on setting up a SCCM2012 environment. The environment includes a Central Administration Server and a Primary Site Server. The Software Update Point role was already installed on the CAS, but not on the primary.
Clients in the primary site aren’t able to retrieve Windows Updates directly from the CAS, therefore I wanted to add the SUP role on the Primary site server.
First: Install WSUS.
The most easy part of it all is installing WSUS on a Windows 2012 server (I thought). In Windows 2012 WSUS can be installed as a Server Role, directly from Server Manager. Because I already had all the required pre-requisites, I only needed to add WSUS. This all went fine,but… After the installation there is a Post-installation job to configure WSUS.
(When using SCCM you don’t need to configure WSUS, but at least the post-installation job should start to finish the installation of WSUS.)
The Post-installation job just failed and keeps failing!
In my log-file (%localappdata%temp) I noticed the following:
[error]Config file did not contain a value "ContentDirectory"
[/error]
Ehm….never had to add this manually? So how to do this?
I went to: C:windowsSystem32ServerManagerComponentConfiguration and opened UpdateServices-Services.xml
The file contained:
[code]<?xml version=”1.0″ encoding=”utf-16″?><INSTANCE CLASSNAME=”ServerComponent_UpdateServices_Services”><PROPERTY NAME=”ContentDirectory” TYPE=”string”></PROPERTY><PROPERTY NAME=”ContentLocal” TYPE=”boolean”></PROPERTY></INSTANCE>[/code]
I added the content directory: D:WSUS and the value true for contentlocal
[code]<?xml version=”1.0″ encoding=”utf-16″?><INSTANCE CLASSNAME=”ServerComponent_UpdateServices_Services”><PROPERTY NAME=”ContentDirectory” TYPE=”string”><VALUE>D:WSUS</VALUE></PROPERTY><PROPERTY NAME=”ContentLocal” TYPE=”boolean”><VALUE>true</VALUE></PROPERTY></INSTANCE>[/code]
After that I tried the post-installation job again.
The Content folder D:WSUS was created, but another failure…
This time with the error:
[error]Config file did not contain a value "InstanceName"
[/error]
So let’s change the InstanceName in the UpdateServices-DB.xml.
I added the default DatabaseName “SUSDB”:
[code]<?xml version=”1.0″ encoding=”utf-16″?><INSTANCE CLASSNAME=”ServerComponent_UpdateServices_Database”><PROPERTY NAME=”InstanceName” TYPE=”string”><VALUE>SUSDB</VALUE></PROPERTY></INSTANCE>[/code]
Let’s have another go at the Post-Installation job…
The process is running…and… Another failure. Now with the following error:
[error]System.Net.Sockets.SocketException (0x80004005): No such host is known
[/error]
Ehm… Let’s start the Post-Installation job manually. Start PowerShell (as administrator) and navigate to: “C:Program FilesUpdate ServicesTools” (This is the default location where Wsusutil.exe is stored).
Then enter the following command:
[code language=”powershell”]wsusutil.exe postinstall CONTENT_DIR=D:WSUS SQL_INSTANCE_NAME=SQLSERVER.domain.local[/code]
postinstall started…
postinstall suceesfull !
Great! Let’s open WSUS to test. [notice]Please remind: CANCEL the WSUS configuration wizard!!! [/notice]
WSUS opened! 🙂
After the pain of installing WSUS on my Primary Site Server I was able to easily add the SUP role on my Primary Site Server and deploy updates to my clients.
These steps worked for me and I hope this will also work for you. Even better if you don’t need these steps of course!
3 comments
Thanks Ruben. I was having the same issue reinstalling my WSUS role. This fixed my issue perfectly. Thanks again for sharing
I had a little trouble with the steps for some reason. What worked was using Server Manager, going to WSUS on the left hand navigation, and I was able to right click on one of the columns in the views on the right hand side to select WSUS from the context menu. This let me retype everything and run the post setup tasks again. That worked! Then I just cleared the previous errors.
Author
Thanks for sharing!