Sharepoint 2013 Updates Error

Dave Nordin 1 Reputation point
2021-10-07T13:50:30.063+00:00

Hi

While trying to run Sharepoint 2013 Updates using the powershell script:

Apply server upgrades

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures

Got errors for the first time in years on updated Windows Server (On Prem) 2012 R2:

10/07/2021 07:15:07 1 ERR Failed to upgrade SharePoint Products.
An exception of type Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException was thrown. Additional exception information: The upgrade command is invalid or a failure has been encountered.

Follow this link for more information about how to troubleshoot upgrade failures:
https://go.microsoft.com/fwlink/?LinkId=259653

Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException: Exception of type 'Microsoft.SharePoint.PostSetupConfiguration.PostSetupConfigurationTaskException' was thrown.
at Microsoft.SharePoint.PostSetupConfiguration.UpgradeTask.Run()
at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

Microsoft 365 and Office | SharePoint Server | For business
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Allen Xu_MSFT 13,866 Reputation points
    2021-10-08T06:36:04.29+00:00

    Hi @Dave Nordin ,

    Please have a try to the below solution to this issue(Note: run all PowerShell (PS) commands as an administrator in an elevated PowerShell window – need 2 pre-opened windows):

    • Turn off all the following services (you can do this in your first PowerShell window). net stop SPTraceV4; net stop SPWriterV4; net stop SPAdminV4; net stop SPTimerV4; net stop w3svc
    • Manually stop both search services (in the services GUI on the SP server). Then run the following command in your second PowerShell window. stsadm -o setproperty -pn command-line-upgrade-running -pv No
    • Flush the Config Cache follow this blog post and run the following PowerShell in your second PowerShell window. PSConfig.exe -cmd upgrade -inplace b2b -force -cmd applicationcontent -install -cmd installfeatures
    • As soon as it reaches the step where the error appeared before in the upgrade process, in the first elevated PS window, run the following PS. net start SPTraceV4; net start SPWriterV4; net start SPAdminV4; net start SPTimerV4; net start w3svc
    • Quickly and manually start the two search services (in the Services GUI on the SP Server). The upgrade process should complete successfully after this.

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.