0
votes

I have two WFE in SharePoint 2013 farm. On one of my server, I have scheduled powershell script with task scheduler for daily activity.

Last week servers gone through patching for latest patches. After patching I found out my server is no longer running the scripts and throwing error :

Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url: http:///<SiteUrl>.

However my second WFE is still able to run the same scripts.

2

2 Answers

0
votes

Re-run the Sharepoint Products Configuration Wizard in the problematic WFE may solve the problem.

0
votes

(Posted on behalf of the OP).

I ran this script on my WFE and problem is resolved :)

$h = Get-SPServiceHostconfig

$h.Provision()

$services = Get-SPServiceApplication

foreach ($service in $services) { $service.provision();
write-host $service.name}