Sharepoint 2013 SP1 & Server 2012 R2 Prerequisites Powershell Scripts

As with the RTM release of SharePoint 2013, Sharepoint 2013 SP1 has alot of prerequisites. This includes server features and additional EXE files that need to be installed before SharePoint will proceed with the install.

I created 2x scripts and 1x txt file, they are as follows:

  • Script 1 – Server features. This installs all the server features/roles needed for SharePoint. Once installed reboot your server.
  • TXT file – This includes all the .EXE files (Prerequisites) needed. Download them to a specific location.
  • Script 2 – This looks at the folder where you downloaded all the seperate .EXE files above and installs them for you. Make sure to put in the drive letter for example. D:\ and the folder name.

Run both Scripts from Powershell.

Here is the location on Technet to the scripts:

Hope it helps.

Failed to connect to the configuration database when adding server to SharePoint 2013 farm

Today I installed a new SharePoint 2013 Server to add to my existing farm.

I installed SQL and all the prerequisites for SharePoint, rebooted a couple of times.

After all the installs I installed the April 2014 CU for SharePoint as the second server needs to match the existing one.

The install takes a little while but all was successful. When I launched the SharePoint Products Configuration Wizard and chose to connect to the existing farm I was presented with the error below:

sharepoint product configuration

When I tried to open the data base of the existing server on this server from SQL Management Studio I was presented with the follow error:

  • The target principal name is incorrect. Cannot generate SSPI context.

In Active Directory, I opened the computer record for the Database server. In the attribute list, the servicePrincipalName attribute showed the following entries:

Delete the two MSSQLSvc entries as well as the RestrictedKrbHost entries. Restart the DB server and the problem should be resolved.

Hope it helps

SharePoint 2013 Upgrade Error

Today I ran the SharePoint 2013 April 2014 CU. The extraction and installation was successful.

Upon running the SharePoint Configuration Wizard after the restart, PSCONFIG failed immediately on step 3 with the following error:

  • This upgrade session has been stopped. Possible causes include the process being terminated abruptly or the OS has rebooted. Please restart the upgrade again.

Trying to rack my brain, i remembered i changed the farm admin account password a few weeks ago. Could this be a permission error?

I fired up the SharePoint Management Shell and ran the following command:

  • stsadm -o updatefarmcredentials -userlogin <domain\name> -password <password>

I was presented with this error:

  • Error deploying administration application pool credentials. Another deployment may be active. An object of the type Microsoft.SharePoint.Administration.SPAdminAppPoolCredentialDeploymentJobDefinition named “job-admin-apppool-change” already exists under the parent Microsoft.SharePoint.Administration.SPTimerService named “SPTimerV4”. Rename your object or delete the existing object.

To fix this we need to delete this job. Here is the command I used:

  • $app = Get-SPTimerJob -Identity “job-admin-apppool-change”


After this I ran the above command to update the farm account password and it worked. The command completed successfully.

I now went and ran “PSCONFIG.EXE -cmd Upgrade -inplace b2b -wait”  again and the April 2014 CU for SharePoint Server updated within a matter of minutes.

Now if I go and check the version SharePoint Server 2013 is now on : 15.0.4605.1000

Hope it helps!

SharePoint Server 2013 SP1 (Updated)

MSFT released this CU a few days ago. The download is 1.3Gb like the previous ones.

After downloading this update right click on the CU and select “Run As Administrator”

The update takes a while to extract and then checks what needs to be updated. The update itself then takes aprox 4-5 hours to install.

Once installed it prompts to reboot the server. After the reboot you can open up the SharePoint Configuration Wizard and let it upgrade.

Mine took quite a while but when through the steps until Step 9 of 10. The upgrade sat there for about 20 min before proceeding on to Step 10 and then finishing.

One thing I noticed is that the previous “bug” if you want to call it that seems to be fixed:

***My SharePoint Server out of the blue started throwing event ID 6398. The error is :

  • Unexpected exception in FeedCacheService.IsRepopulationNeeded: Unable to create a DataCache. SPDistributedCache is probably down..***

Hope it helps

Unexpected exception in FeedCacheService.IsRepopulationNeeded: Unable to create a DataCache. SPDistributedCache is probably down..

My SharePoint Server out of the blue started throwing event ID 6398. The error is :

  • Unexpected exception in FeedCacheService.IsRepopulationNeeded: Unable to create a DataCache. SPDistributedCache is probably down..

I ran Get-CacheHost and it was listing an old SharePoint Server plus the new one. Trying to remove it resulted in the famous “CacheHostInfo is null” error.

The Service on SharePoint Central Admin also gave the same error “CacheHostInfo is null”.

I went and checked the DistributedCacheService.exe.config file and the information was listed. I also checked the registry key for AppFabric and it had no information, so I copied the information listed in the Config file and pasted it in the Registry.

I exported the config file, removed the old server and then imported the config again. After that I ran the following commands:

$SPFarm = Get-SPFarm
$cacheClusterName = “SPDistributedCacheCluster_” + $SPFarm.Id.ToString()
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName);
$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq “Server Name”}

This took a few minutes to run. When it was completed the AppFabric service started under services.msc and when I went to the Services under SharePoint Central Management it was also started.

Hope it helps


It seems like this is a bug in SP1 for SharePoint. Randomly I get the same error and today I started having these errors logged every 5 min.

What I did was open up the SharePoint Management Shell as Administrator and then execute the following commands:

  • Stop-CacheCluster
  • Export-CacheClusterConfig
  • Import-CacheClusterConfig
  • Start-CacheCluster

This seems to work but for how long? The April CU for SharePojnt has not been released as yet. Hopefully it fixes this error.

PSConfig Stuck at 10%

After I rebuilt my SharePoint Server I moved across one last database. After a restart SharePoint reported that the database was in compatibility mode.

I opened up an elevated SharePoint PowerShell and ran the following command:

  • PSConfig.exe -cmd upgrade -inplace b2b -force

PSConfig went through the steps and got stuck on Step 3. This has to be a permission problem. Remembering that on my old server I made changes to the registry permissions.

I ran regedit and navigated to the following key:

  • HKEY_LOCAL_MACHINE\Software\Microsoft\Shared Tools\Web Server Extensions\15.0\Secure

If you right click on the secure key and click permissions you will see the WSS_ADMIN_WPG and WSS_WPG users. I granted both full access.

Immediately after I made this change the upgrade commenced and was successful.

Hope it helps

SharePoint 2013 SP1 Upgrade failure

I downloaded SP1 for SharePoint 2013 and applied it. After the reboot everything seemed normal. I then ran the products and configuration upgrade and it failed directly on step 2. I enabled all the services it stopped and saw if I could open up my sites.

The configuration site opened but when I tried to open up my main site it gave the famous “Sorry, Something went wrong” error.

I checked the event logs and saw that it was giving an error regarding the SharePoint Foundation 1033 language pack.

I ran a repair from “Programs and Features” and this failed with the same error regarding the language pack.

I then mounted the SharePoint 2013 ISO, tried to run a repair from there with the same error.

I then tried to uninstall SharePoint 2013 and I got the same error. I was not going to waste time so I built a brand new SharePoint Server.

After applying all updates and bringing SharePoint 2013 up to SP1 I had a plain site. Now the work began. I backed up all databases from the “old” SharePoint server and then restored them one by one on the “New” Server.

I then ran the products and Configuration wizard again and chose my SharePoint Farm config. It took a while but the setup was successful.

After that I was able to login to Central Management but not onto my site. I was missing my certificate, I imported this into IIS again, ran an IISReset and tried to open my site again. It failed with a custom error. I then checked the logs and it was complaining about the user profile service. I removed this and after I did this my site opened. I recreated the user profile site again.

After this SharePoint was slow, this could only mean that the DB’s needed to be upgraded as they were in compatibility mode.

After I ran PSConfig and did the upgrade SharePoint was now running like it should, however there was one thing missing. I needed to separate my page file from the C:\ drive. I did this, ran a reboot and after this no errors logged and everything well.

It is alot of work firstly setting up a new server but also moving the content DB’s and making sure everything works again.

Hope it helps

DPM 2012 SP1 Backing up SQL 2012 Database Error

I migrated SharePoint to a new server with SQL 2012 SP1 and setup backups with DPM.

The initial setup went fine as DPM could see the Farm, however after the protection group was setup the backups failed immediately with the following error:

  • Unable to Configure Protection

Not a problem, what I have seen from documents seems like a bug in DPM 2012 trying to backup SQL 2012.

To fix this, open up SQL Management Studio, Navigate to Security, expand logins and locate the following account:

  • NT Authority\SYSTEM

Right click on this account and select properties. Go to server roles and tick “sysadmin”. Apply these changes. Now go back to DPM and do a consistency check. It should now backup the databases.

If that fails, delete the protection group and create it again.

Hope it helps

SharePoint 2013: Unified Logging Service Event ID:2159

After a nice festive season I came back to thousands of errors logged in event viewer for the above error:

Seems like this error only started occurring after the recent windows updates released. Never the less you can need to check if Named Pipes is enabled in SQL Configuration and you can run the following command in SQL Management Studio:

USE master

The errors should stop being logged in the application log.

Hope it helps