Skip to content

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

October 11, 2013

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()
Advertisements
5 Comments
  1. bhashwar permalink

    i have tried multiple times, but does not work. it gave me following error:
    The property ‘Status’ cannot be found on this object. Verify that the property exists and can be set.
    At line:1 char:1
    + $svc.Status = “Online”
    + ~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyAssignmentException
    Please help!

  2. Can you make sure value is assigned to $svc ? Also check if service is already online ? its throwing PropertyAssignmentException..

  3. bhashwar permalink

    Hi, umar thankyou for replying so promptly.

    only step 4 worked for me after surfing through several blog post and spending whole day.

    step 1 (did not work)

    1) Get-SPServiceInstance

    2) copy the GUID of the service application you want to start/stop and paste after identity

    3) Start-SPServiceInstance -Identity 0c2873fa-80b7-4349-8dfa-d404476f909c
    Stop-SPServiceInstance -Identity 0c2873fa-80b7-4349-8dfa-d404476f909c

    step 2 (enter the following step by step) (did not work)
    1) $svc = Get-SPServiceInstance | where {$_.TypeName -like “*Foundation Web*”}
    $svc.Status = “offline”
    $svc.Update()

    2) $svc = Get-SPServiceInstance | where {$_.TypeName -like “*Foundation Web*”}
    $svc.Status = “start”
    $svc.Update()

    3) $wa = Get-SPWebApplication http://teamsite5.test.eaglerockenergy.com/
    $wa.ProvisionGlobally()

    step 3 (usually does not work in management studio) (did not work)
    stsadm -o provisionservice -action start -servicetype spwebservice

    step 4 (this worked for me)
    $service = $(Get-SPServiceInstance |where {$_.TypeName -match “Microsoft SharePoint Foundation Web Application” } |where {$_.Server -match “SPServer Name=t200wspa01v”})
    $service.provision()

  4. Reason why script not working is I think you have more then one WFE with the service running and $svc has more then one service instances assigned to it.
    in step 4 ( the one that worked for you ) you have assigned specific instance to $service and that’s why its working for you – that is just my guess.
    To confirm you can try this
    $svc = Get-SPServiceInstance | where {$_.TypeName -like “*Foundation Web*”}| Where {$_.Server -match “SPServer Name=t200wspa01v”}
    $svc.Status = “Offline”
    $svc.Update()

    Let me know.

  5. bhashwar permalink

    Hi Umar,
    I am pretty sure that is the reason, because we have multiple WFE’s.
    I will let you know after i try it.
    Thank You!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: