Share via


How to get back the SharePoint WebServices applicaion in IIS if deleted, SharePoint 2010

Technorati Tags: Sharepoint 2010,Sharepoint WebService Application,web service

In SharePoint 2010, if you have deleted or some how removed the Sharepoint Webservice site unknowingly.

its hard to get it back, in spite of running psconfig we would not able to get the SharePoint Webservice back.

It is the same SharePoint webservice application which we see in Sharepoint 2007

Here is is powershell script which can help us to get all the running service back under IIS with their GUID.

 

$webservice = [System.Type]::GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")

 

 

$Instance = $webservice::Default

$Method = $webservice.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null)

$Method.Invoke($Instance, $null)

$Method = $webservice.GetMethod("Provision", "Instance, Public", $null, @(), $null)

$Method.Invoke($Instance, $null)

Once we are done with about script we should have “SharePoint Web Service” under IIS with only few information.

now we need to get all the respective VD in IIS.

Get-SPServiceApplication | ForEach-Object {$_.Provision()}

 

Above steps should helps us to get the missing VD and Sharepoint Webservice back in IIS.

Comments

  • Anonymous
    January 01, 2003
    Thanks! This worked for me in multi-tier SharePoint 2013 farm. Just make sure you create the root folder on all WFEs.

  • Anonymous
    July 26, 2011
    Thanks for the above guide, I'm still having the problem that after executing the final $Method.Invoke($Instance, $null) PowerShell seems to hang showing no activity, allthough the site is created in IIS, it only seems partially there as none of the asp files are present and when exploring the directories, all the content is blank.  Running the Get-SPServiceApplication | ForEach-Object {$_.Provision()} makes no difference either, and again seems to han

  • Anonymous
    February 28, 2012
    sorry for my poor English reading, i think it means although we have run psconfig, it is still not get back. and a typo: $Method = $werbservice.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null) should be: $Method = $webservice.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null)

  • Anonymous
    October 22, 2013
    The comment has been removed

  • Anonymous
    November 14, 2013
    Hi Craig, Apologize for delayed response. I have retested it and it works fine on my machine. if you are still facing the issue, could paste the error message here. Regards, Vinit

  • Anonymous
    December 12, 2013
    The comment has been removed

  • Anonymous
    February 07, 2014
    The comment has been removed