Wednesday 29 April 2015

Restart Microsoft SharePoint Foundation Web Application Service. Stuck at Stopping.


I wanted to share some information in case you are planning to restart “Microsoft SharePoint Foundation Web Application” service or any other service and got stuck with status showing “Stopping” you can use power shell command mentioned below
I had a situation when “Microsoft SharePoint Foundation Web Application” service was Showing “Stopping” status for more than 7 hours and even reboot and IIS reset did not do anything. I was able to restore service in normal condition using command mentioned below.
Note: In case you are planning to restart “Microsoft SharePoint Foundation Web Application” service better back up your IIS and Virtual directory folder to be on the safe side.
Credit goes to Trevor Seward from TechNet who shared this trick  and show easy way to restore/provision virtual directory folder.

If you have the same situation where some service is stuck use power shell to stop it
$svc = Get-SPServiceInstance | where {$_.TypeName -like "*Foundation Web*"}
$svc.Status = "Offline"
$svc.Update()

You can use PowerShell to start it again
$svc = Get-SPServiceInstance | where {$_.TypeName -like "*Foundation Web*"}
$svc.Status = "Online"
$svc.Update()

In order to get virtual directories back run this PowerShell command
$wa = Get-SPWebApplication http://webAppUrl

$wa.ProvisionGlobally()

No comments:

Post a Comment