SharePoint: Error Object reference not set to an instance of an object

When creating a webapplication in SharePoint you get the error Object reference not set to an instance of an object
Make sure the Microsoft SharePoint Foundation Web Application Service is running.

In my case the service had the status upgrading.

Enter the following powershell commands:

$service = $(Get-SPServiceInstance |where {$_.TypeName -match “Microsoft SharePoint Foundation Web Application” } |where {$_.Server -match “SPServer Name=yourservername”})
$service.Status = "Online"
$service.Update()

After an IISReset I was able to create webapplications again

Leave a Reply

Your email address will not be published.