Monday, July 6, 2015

SharePoint 2013: Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url

Problem

You are attempting to execute a Get-SPWeb, Get-SPSite or similar commandlet in an elevated SharePoint Management shell, but each time experience an error of type,
Get-SPWeb : Cannot find an SPSite object that contains the following Id or Url: htp://[yoursite]
One possible cause for this error is the SecurityTokenService.

Solution
  • In IIS, stop and start the SecurityTokenServiceApplicationPool.
References
  • None

No comments: